summaryrefslogtreecommitdiff
path: root/net/ncsi
diff options
context:
space:
mode:
authorYury Norov <yury.norov@gmail.com>2021-08-15 00:17:03 +0300
committerYury Norov <yury.norov@gmail.com>2022-01-15 19:47:31 +0300
commitb5c7e7ec7d3418af2544452b45cc67297c857a86 (patch)
tree1b2d0bd3d0852b65d73b65982d4b8f69c27703e7 /net/ncsi
parent93ba139ba8190c33009c5353ca43c8519443f467 (diff)
downloadlinux-b5c7e7ec7d3418af2544452b45cc67297c857a86.tar.xz
all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where appropriate
find_first{,_zero}_bit is a more effective analogue of 'next' version if start == 0. This patch replaces 'next' with 'first' where things look trivial. Signed-off-by: Yury Norov <yury.norov@gmail.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'net/ncsi')
-rw-r--r--net/ncsi/ncsi-manage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 7121ce2a47c0..78814417d753 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -608,7 +608,7 @@ static int clear_one_vid(struct ncsi_dev_priv *ndp, struct ncsi_channel *nc,
bitmap = &ncf->bitmap;
spin_lock_irqsave(&nc->lock, flags);
- index = find_next_bit(bitmap, ncf->n_vids, 0);
+ index = find_first_bit(bitmap, ncf->n_vids);
if (index >= ncf->n_vids) {
spin_unlock_irqrestore(&nc->lock, flags);
return -1;
@@ -667,7 +667,7 @@ static int set_one_vid(struct ncsi_dev_priv *ndp, struct ncsi_channel *nc,
return -1;
}
- index = find_next_zero_bit(bitmap, ncf->n_vids, 0);
+ index = find_first_zero_bit(bitmap, ncf->n_vids);
if (index < 0 || index >= ncf->n_vids) {
netdev_err(ndp->ndev.dev,
"Channel %u already has all VLAN filters set\n",