aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2022-05-03 15:01:48 +0300
committerJakub Kicinski <kuba@kernel.org>2022-05-04 20:42:15 -0700
commit09fd1e0d14815fd2c80577f4116c8976d8d080f8 (patch)
tree7f15c965424fe61c31c991e418738e2f36899b6f /net/core/dev.c
parentnet: mscc: ocelot: add to tail of empty list in ocelot_vcap_filter_add_to_block (diff)
downloadlinux-rng-09fd1e0d14815fd2c80577f4116c8976d8d080f8.tar.xz
linux-rng-09fd1e0d14815fd2c80577f4116c8976d8d080f8.zip
net: mscc: ocelot: use list_for_each_entry in ocelot_vcap_filter_add_to_block
Unify the code paths for adding to an empty list and to a list with elements by keeping a "pos" list_head element that indicates where to insert. Initialize "pos" with the list head itself in case list_for_each_entry() doesn't iterate over any element. Note that list_for_each_safe() isn't needed because no element is removed from the list while iterating. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/dev.c')
0 files changed, 0 insertions, 0 deletions