diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-11-18 20:37:15 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-19 12:19:11 +0100 |
commit | a6366b13c165e5d8d8b06d8d732a4f98bfb8ef66 (patch) | |
tree | 8ba8f1e0cbd80c19688ba62146be34ecdeaf5ba9 /drivers/net/ipa | |
parent | bnx2x: Use struct_group() for memcpy() region (diff) | |
download | linux-a6366b13c165e5d8d8b06d8d732a4f98bfb8ef66.tar.xz linux-a6366b13c165e5d8d8b06d8d732a4f98bfb8ef66.zip |
net: ipa: Use 'for_each_clear_bit' when possible
Use 'for_each_clear_bit()' instead of hand writing it. It is much less
version.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa')
-rw-r--r-- | drivers/net/ipa/ipa_mem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index 4337b0920d3d..1e9eae208e44 100644 --- a/drivers/net/ipa/ipa_mem.c +++ b/drivers/net/ipa/ipa_mem.c @@ -266,9 +266,7 @@ static bool ipa_mem_valid(struct ipa *ipa, const struct ipa_mem_data *mem_data) } /* Now see if any required regions are not defined */ - for (mem_id = find_first_zero_bit(regions, IPA_MEM_COUNT); - mem_id < IPA_MEM_COUNT; - mem_id = find_next_zero_bit(regions, IPA_MEM_COUNT, mem_id + 1)) { + for_each_clear_bit(mem_id, regions, IPA_MEM_COUNT) { if (ipa_mem_id_required(ipa, mem_id)) dev_err(dev, "required memory region %u missing\n", mem_id); |