]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
uwb: use for_each_clear_bit()
authorAkinobu Mita <akinobu.mita@gmail.com>
Fri, 23 Mar 2012 22:02:05 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 23:58:34 +0000 (16:58 -0700)
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>
drivers/uwb/allocator.c

index e45e673b8770e78a44b9ba0c0ace5f70122606e8..6e3e713f0ef713133b83ee948cc77e0b2dfcc76b 100644 (file)
@@ -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);