]> 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)
commit41254ad7c0d55d1e2470375d2bcde9093a2609c4
treedbfd1fc606cb607542cdcb61c2b1c9e56f41c81a
parentd5370a3e663e0b2f56de0b083bca280ec3208e3f
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