[PATCH 1/2] mtd: core: Fix compilation warning.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix following warning:
drivers/mtd/core.c: In function 'mtd_ioctl':
drivers/mtd/core.c:122:24: warning: unused variable 'ecc'

Found in at91rm9200ek_defconfig.

Signed-off-by: Marek Belisko <marek.belisko@xxxxxxxxxxxxxxx>
---
 drivers/mtd/core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index ccc5c26..e11ba64 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -119,7 +119,6 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
 	int ret = 0;
 	struct mtd_info *mtd = cdev->priv;
 	struct mtd_info_user *user = buf;
-	struct mtd_ecc_stats *ecc = buf;
 	struct region_info_user *reg = buf;
 
 	switch (request) {
@@ -146,6 +145,8 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
 		break;
 #if (defined(CONFIG_NAND_ECC_HW) || defined(CONFIG_NAND_ECC_SOFT))
 	case ECCGETSTATS:
+		struct mtd_ecc_stats *ecc = buf;
+
 		ecc->corrected = mtd->ecc_stats.corrected;
 		ecc->failed = mtd->ecc_stats.failed;
 		ecc->badblocks = mtd->ecc_stats.badblocks;
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux