[PATCH] cfi_cmdset_0001.c: sparse fixes

Ben Dooks ben-linux at fluff.org
Mon May 28 15:11:37 EDT 2007


Fix sparse warnings generated from cfi_cmdset_0001.c.

drivers/mtd/chips/cfi_cmdset_0001.c:1783:5: warning: symbol 'cfi_intelext_erase_varsize' was not declared. Should it be static?
drivers/mtd/chips/cfi_cmdset_0001.c:2258:43: warning: Using plain integer as NULL pointer

Signed-off-by: Ben Dooks <ben-linux at fluff.org>

--- linux-2.6.22-rc3/drivers/mtd/chips/cfi_cmdset_0001.c	2007-05-27 18:54:21.000000000 +0100
+++ linux-2.6.22-rc3-sparse1/drivers/mtd/chips/cfi_cmdset_0001.c	2007-05-28 20:09:26.000000000 +0100
@@ -1780,7 +1780,7 @@ static int __xipram do_erase_oneblock(st
 	return ret;
 }
 
-int cfi_intelext_erase_varsize(struct mtd_info *mtd, struct erase_info *instr)
+static int cfi_intelext_erase_varsize(struct mtd_info *mtd, struct erase_info *instr)
 {
 	unsigned long ofs, len;
 	int ret;
@@ -2255,7 +2255,7 @@ static void cfi_intelext_save_locks(stru
 			adr = region->offset + block * len;
 
 			status = cfi_varsize_frob(mtd,
-					do_getlockstatus_oneblock, adr, len, 0);
+					do_getlockstatus_oneblock, adr, len, NULL);
 			if (status)
 				set_bit(block, region->lockmap);
 			else




More information about the linux-mtd mailing list