Skip to contentSkip to conversation

fix nftl_write warning

PATCH New Frederik Deweerdt 1 participant 1 message Sep 30, 2006 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix nftl_write warning

Hi,

Building 2.6.18-mm2 issues the following warning if CONFIG_NFTL_RW is not set:
CC [M] drivers/mtd/nftlcore.o
drivers/mtd/nftlcore.c:183: warning: 'nftl_write' defined but not used The following patch only compiles nftl_write if CONFIG_NFTL_RW is set.

Regards,
Frederik

drivers/mtd/nftlcore.c +2 -2
index dd5cea8..b5a5f8d 100644
@@ -175,6 +175,8 @@ int nftl_write_oob(struct mtd_info *mtd,
 	return res;
 }
 
+#ifdef CONFIG_NFTL_RW
+
 /*
  * Write data and oob to flash
  */
@@ -196,8 +198,6 @@ static int nftl_write(struct mtd_info *m
 	return res;
 }
 
-#ifdef CONFIG_NFTL_RW
-
 /* Actual NFTL access routines */
 /* NFTL_findfreeblock: Find a free Erase Unit on the NFTL partition. This function is used
  *	when the give Virtual Unit Chain