mtd: s3c2410: Fix compiler warnings
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Sep 29 10:59:09 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=19da4158d33053c6e91e95ee0663d625b2d32a77
Commit: 19da4158d33053c6e91e95ee0663d625b2d32a77
Parent: 6f32a3e2853da194bd541fa107645d71c4eaaef9
Author: Sachin Kamat <sachin.kamat at linaro.org>
AuthorDate: Tue Aug 21 14:24:10 2012 +0530
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Sat Sep 29 15:10:04 2012 +0100
mtd: s3c2410: Fix compiler warnings
Fixes the following warnings:
‘s3c2410_nand_correct_data’ defined but not used [-Wunused-function]
‘s3c2410_nand_enable_hwecc’ defined but not used [-Wunused-function]
‘s3c2412_nand_enable_hwecc’ defined but not used [-Wunused-function]
‘s3c2440_nand_enable_hwecc’ defined but not used [-Wunused-function]
‘s3c2410_nand_calculate_ecc’ defined but not used [-Wunused-function]
‘s3c2412_nand_calculate_ecc’ defined but not used [-Wunused-function]
‘s3c2440_nand_calculate_ecc’ defined but not used [-Wunused-function]
The above functions are called only when CONFIG_MTD_NAND_S3C2410_HWECC
is defined. Thus making them conditional.
Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/s3c2410.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 90a630a..792cee8 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -442,6 +442,7 @@ static int s3c2412_nand_devready(struct mtd_info *mtd)
/* ECC handling functions */
+#ifdef CONFIG_MTD_NAND_S3C2410_HWECC
static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat,
u_char *read_ecc, u_char *calc_ecc)
{
@@ -592,6 +593,7 @@ static int s3c2440_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
return 0;
}
+#endif
/* over-ride the standard functions for a little more speed. We can
* use read/write block to move the data buffers to/from the controller
More information about the linux-mtd-cvs
mailing list