The patch titled Subject: mtd: use for_each_clear_bit() has been added to the -mm tree. Its filename is mtd-use-for_each_clear_bit.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Akinobu Mita <akinobu.mita@xxxxxxxxx> Subject: mtd: 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@xxxxxxxxx> Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/mtd/chips/cfi_cmdset_0001.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff -puN drivers/mtd/chips/cfi_cmdset_0001.c~mtd-use-for_each_clear_bit drivers/mtd/chips/cfi_cmdset_0001.c --- a/drivers/mtd/chips/cfi_cmdset_0001.c~mtd-use-for_each_clear_bit +++ a/drivers/mtd/chips/cfi_cmdset_0001.c @@ -2526,12 +2526,10 @@ static void cfi_intelext_restore_locks(s if (!region->lockmap) continue; - for (block = 0; block < region->numblocks; block++) { + for_each_clear_bit(block, region->lockmap, region->numblocks) { len = region->erasesize; adr = region->offset + block * len; - - if (!test_bit(block, region->lockmap)) - cfi_intelext_unlock(mtd, adr, len); + cfi_intelext_unlock(mtd, adr, len); } } } _ Subject: Subject: mtd: use for_each_clear_bit() Patches currently in -mm which might be from akinobu.mita@xxxxxxxxx are origin.patch bitops-rename-for_each_set_bit_cont-in-favor-of-analogous-listh-function.patch bitops-remove-for_each_set_bit_cont.patch bitops-introduce-for_each_clear_bit.patch mtd-use-for_each_clear_bit.patch s390-char-use-for_each_clear_bit.patch uwb-use-for_each_clear_bit.patch x86-use-for_each_clear_bit_from.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html