[PATCH 6/7] uwb: use for_each_clear_bit

From: Akinobu Mita
Date: Fri Jan 13 2012 - 10:54:01 EST


Use for_each_clear_bit() to iterate over all the cleared bit in a
memory region.

Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Cc: linux-usb@xxxxxxxxxxxxxxx
---
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 e45e673..6e3e713 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


/* fill the not available vector from the available bm */
- for (bit_index = 0; bit_index < UWB_NUM_MAS; bit_index++) {
- if (!test_bit(bit_index, available->bm))
- ai->bm[bit_index] = UWB_RSV_MAS_NOT_AVAIL;
- }
+ for_each_clear_bit(bit_index, available->bm, UWB_NUM_MAS)
+ ai->bm[bit_index] = UWB_RSV_MAS_NOT_AVAIL;

if (ai->max_interval == 1) {
get_row_descriptors(ai);
--
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/