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)
commit854701ba4c39afae2362ba19a580c461cb183e4f
treedbfd1fc606cb607542cdcb61c2b1c9e56f41c81a
parent944c417daeb63fa345fe0f754c57a5a23ca6d701
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