diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2012-03-23 18:02:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 19:58:34 -0400 |
commit | 1a07cbba1425ec7215854cfaa9a8df66047cfb57 (patch) | |
tree | 3dc6e41857e23fa9652871d2790f708359a3638c /drivers/uwb/allocator.c | |
parent | fc89db4b789fc9edf88440f6896f04a879ed3b46 (diff) |
uwb: use for_each_clear_bit()
Use for_each_clear_bit() to iterate over all the cleared bit in a
memory region.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Stefano Panella <stefano.panella@csr.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/uwb/allocator.c')
-rw-r--r-- | drivers/uwb/allocator.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/uwb/allocator.c b/drivers/uwb/allocator.c index e45e673b8770..6e3e713f0ef7 100644 --- a/drivers/uwb/allocator.c +++ b/drivers/uwb/allocator.c | |||
@@ -334,10 +334,8 @@ int uwb_rsv_find_best_allocation(struct uwb_rsv *rsv, struct uwb_mas_bm *availab | |||
334 | 334 | ||
335 | 335 | ||
336 | /* fill the not available vector from the available bm */ | 336 | /* fill the not available vector from the available bm */ |
337 | for (bit_index = 0; bit_index < UWB_NUM_MAS; bit_index++) { | 337 | for_each_clear_bit(bit_index, available->bm, UWB_NUM_MAS) |
338 | if (!test_bit(bit_index, available->bm)) | 338 | ai->bm[bit_index] = UWB_RSV_MAS_NOT_AVAIL; |
339 | ai->bm[bit_index] = UWB_RSV_MAS_NOT_AVAIL; | ||
340 | } | ||
341 | 339 | ||
342 | if (ai->max_interval == 1) { | 340 | if (ai->max_interval == 1) { |
343 | get_row_descriptors(ai); | 341 | get_row_descriptors(ai); |