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

From: Stephen Rothwell
Date: Wed Apr 07 2010 - 21:42:44 EST


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: dwmw2@xxxxxxxxxxxxx
Cc: akpm@xxxxxxxxxxxxxxxxxxxx, akinobu.mita@xxxxxxxxx, adobriyan@xxxxxxxxx,
davem@xxxxxxxxxxxxx, dedekind@xxxxxxxxxxxxx, rmk@xxxxxxxxxxxxxxxx,
sfr@xxxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Mon, 05 Apr 2010 13:53:35 -0700

From: Akinobu Mita <akinobu.mita@xxxxxxxxx>

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 <adobriyan@xxxxxxxxx>
Suggested-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Russell King <rmk@xxxxxxxxxxxxxxxx>
Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Cc: Artem Bityutskiy <dedekind@xxxxxxxxxxxxx>
Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

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 sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/