aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2022-05-03 15:01:46 +0300
committerJakub Kicinski <kuba@kernel.org>2022-05-04 20:42:14 -0700
commit0a448bba50090a6147c144f452f49301025111ec (patch)
treecbd49a8f2e2c6f08be38d7ed1613b7e79bcf0287
parentdt-bindings: net: lan966x: fix example (diff)
downloadwireguard-linux-0a448bba50090a6147c144f452f49301025111ec.tar.xz
wireguard-linux-0a448bba50090a6147c144f452f49301025111ec.zip
net: mscc: ocelot: use list_add_tail in ocelot_vcap_filter_add_to_block()
list_add(..., pos->prev) and list_add_tail(..., pos) are equivalent, use the later form to unify with the case where the list is empty later. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/mscc/ocelot_vcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_vcap.c b/drivers/net/ethernet/mscc/ocelot_vcap.c
index 1e74bdb215ec..5b6f22bd0e5f 100644
--- a/drivers/net/ethernet/mscc/ocelot_vcap.c
+++ b/drivers/net/ethernet/mscc/ocelot_vcap.c
@@ -1013,7 +1013,7 @@ static int ocelot_vcap_filter_add_to_block(struct ocelot *ocelot,
if (filter->prio < tmp->prio)
break;
}
- list_add(&filter->list, pos->prev);
+ list_add_tail(&filter->list, pos);
return 0;
}