Commit a6366b13 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 29fd0ec6
...@@ -266,9 +266,7 @@ static bool ipa_mem_valid(struct ipa *ipa, const struct ipa_mem_data *mem_data) ...@@ -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 */ /* Now see if any required regions are not defined */
for (mem_id = find_first_zero_bit(regions, IPA_MEM_COUNT); for_each_clear_bit(mem_id, regions, IPA_MEM_COUNT) {
mem_id < IPA_MEM_COUNT;
mem_id = find_next_zero_bit(regions, IPA_MEM_COUNT, mem_id + 1)) {
if (ipa_mem_id_required(ipa, mem_id)) if (ipa_mem_id_required(ipa, mem_id))
dev_err(dev, "required memory region %u missing\n", dev_err(dev, "required memory region %u missing\n",
mem_id); mem_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment