Subject: linux-next: build failure after merge of the mtd tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 8 Apr 2010 11:42:35 +1000

Hi David,

After merging the mtd tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/mtd/sm_ftl.c: In function 'sm_cache_flush':
drivers/mtd/sm_ftl.c:937: error: implicit declaration of function 'for_each_bit'
drivers/mtd/sm_ftl.c:938: error: expected ';' before '{' token
drivers/mtd/sm_ftl.c:964: error: label 'restart' used but not defined

OK, not a suprise since Andrew submitted the "remove for_each_bit" patch
and you haven't applied the patch below to the mtd tree.  Commit
7d17c02a01a111f40986859f044c8c4cce8a4aa6 ("mtd: Add new SmartMedia/xD
FTL") introduces a new use of "for_each_bit".  I have applied the below
patch for today, please add it to the mtd tree ASAP.

Subject: [patch 1/1] bitops: rename for_each_bit() to for_each_set_bit(): mtd
To: [email-masked]
Cc: [email-masked], [email-masked], [email-masked],
        [email-masked], [email-masked], [email-masked],
        [email-masked]
From: [email-masked]
Date: Mon, 05 Apr 2010 13:53:35 -0700

From: Akinobu Mita <[email-masked]>

Rename for_each_bit() to for_each_set_bit in the kernel source tree.  To
permit for_each_clear_bit(), should that ever be added.

I'll be sending a patch to Linus this week which removes the temporary
for_each_bit() macro, so this patch will be needed to avoid build
breakage.

Suggested-by: Alexey Dobriyan <[email-masked]>
Suggested-by: Andrew Morton <[email-masked]>
Signed-off-by: Akinobu Mita <[email-masked]>
Cc: "David S. Miller" <[email-masked]>
Cc: Russell King <[email-masked]>
Cc: David Woodhouse <[email-masked]>
Cc: Artem Bityutskiy <[email-masked]>
Cc: Stephen Rothwell <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/mtd/sm_ftl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/mtd/sm_ftl.c~bitops-rename-for_each_bit-to-for_each_set_bit-mtd drivers/mtd/sm_ftl.c
--- a/drivers/mtd/sm_ftl.c~bitops-rename-for_each_bit-to-for_each_set_bit-mtd
+++ a/drivers/mtd/sm_ftl.c
@@ -934,7 +934,7 @@ int sm_cache_flush(struct sm_ftl *ftl)

 	/* Try to read all unread areas of the cache block*/
-	for_each_bit(sector_num, &ftl->cache_data_invalid_bitmap,
+	for_each_set_bit(sector_num, &ftl->cache_data_invalid_bitmap,
 		ftl->block_size / SM_SECTOR_SIZE) {
 
 		if (!sm_read_sector(ftl,
_

-- 
Cheers,
Stephen Rothwell                    [email-masked]
http://www.canb.auug.org.au/~sfr/