]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix features skip in for_each_netdev_feature()
authorTariq Toukan <tariqt@nvidia.com>
Wed, 4 May 2022 08:09:14 +0000 (11:09 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 May 2022 01:25:57 +0000 (18:25 -0700)
commit890021081840da36a1f942e92b4db5c9a04e77fe
tree8a18da7d4f72a5f7207e1aff7931c0bdb765921b
parentb4690bddd137578824923ba7d93b4d71bf95bad9
net: Fix features skip in for_each_netdev_feature()

The find_next_netdev_feature() macro gets the "remaining length",
not bit index.
Passing "bit - 1" for the following iteration is wrong as it skips
the adjacent bit. Pass "bit" instead.

Fixes: 8e45a8e811c9 ("net: Fix for_each_netdev_feature on Big endian")
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Link: https://lore.kernel.org/r/20220504080914.1918-1-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netdev_features.h