提交 1a07cbba 编写于 作者: A Akinobu Mita 提交者: Linus Torvalds

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: NAkinobu Mita <akinobu.mita@gmail.com>
Cc: Stefano Panella <stefano.panella@csr.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 fc89db4b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册