qed: Use bitmap_empty()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 5 Jul 2022 20:36:26 +0000 (22:36 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jul 2022 02:55:14 +0000 (19:55 -0700)
Use bitmap_empty() instead of hand-writing it.

It is less verbose and it improves the semantic.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/78713a72414b99f673c3a9ec0519bb41c080935a.1657053343.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_rdma.c

index 689a7168448ff5fe875cce56ee61d8c93a597162..5a5dbbb8d8aa12a0783e82d3ad343203cffe3fd4 100644 (file)
@@ -106,7 +106,7 @@ int qed_bmap_test_id(struct qed_hwfn *p_hwfn,
 
 static bool qed_bmap_is_empty(struct qed_bmap *bmap)
 {
-       return bmap->max_count == find_first_bit(bmap->bitmap, bmap->max_count);
+       return bitmap_empty(bmap->bitmap, bmap->max_count);
 }
 
 static u32 qed_rdma_get_sb_id(void *p_hwfn, u32 rel_sb_id)