]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix cpu_max_bits_warn() usage in netif_attrmask_next{,_and}
authorYury Norov <yury.norov@gmail.com>
Mon, 19 Sep 2022 21:05:54 +0000 (14:05 -0700)
committerYury Norov <yury.norov@gmail.com>
Sat, 1 Oct 2022 17:22:57 +0000 (10:22 -0700)
commit5314d5b7f8146f2be166cb48847d29dddfc38b2c
treedbfd1fc606cb607542cdcb61c2b1c9e56f41c81a
parent55c3fc12a1f1235a30af8e36d14c6a6645c3291c
net: fix cpu_max_bits_warn() usage in netif_attrmask_next{,_and}

The functions require to be passed with a cpu index prior to one that is
the first to start search, so the valid input range is [-1, nr_cpu_ids-1).
However, the code checks against [-1, nr_cpu_ids).

Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
include/linux/netdevice.h