Skip to content

Commit

Permalink
uwb: use for_each_clear_bit()
Browse files Browse the repository at this point in the history
Use for_each_clear_bit() to iterate over all the cleared bit in a
memory region.

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Stefano Panella <[email protected]>
Cc: David Vrabel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mita authored and torvalds committed Mar 23, 2012
1 parent fc89db4 commit 1a07cbb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/uwb/allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1a07cbb

Please sign in to comment.