From: Vladimir Oltean Date: Tue, 3 May 2022 12:01:46 +0000 (+0300) Subject: net: mscc: ocelot: use list_add_tail in ocelot_vcap_filter_add_to_block() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0a448bba50090a6147c144f452f49301025111ec;p=linux.git 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 Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/mscc/ocelot_vcap.c b/drivers/net/ethernet/mscc/ocelot_vcap.c index 1e74bdb215ec3..5b6f22bd0e5f2 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; }