mtd: nand: omap: fix compile warning on ‘erased_sector_bitflips’
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jun 10 23:59:02 PDT 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9fd6c6c18c1a4a3220473c76fd447c5708b5ecf9
Commit: 9fd6c6c18c1a4a3220473c76fd447c5708b5ecf9
Parent: c9eaa447e77efe77b7fa4c953bd62de8297fd6c5
Author: Christian Engelmayer <cengelma at gmx.at>
AuthorDate: Tue Apr 15 00:32:05 2014 +0200
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Apr 15 23:20:30 2014 -0700
mtd: nand: omap: fix compile warning on ‘erased_sector_bitflips’
Commit 2c9f2365 (mtd: nand: omap: ecc.calculate: merge omap3_calculate_ecc_bch4
in omap_calculate_ecc_bch) introduced minor compile warning
"‘erased_sector_bitflips’ defined but not used [-Wunused-function]" when
compiling without CONFIG_MTD_NAND_OMAP_BCH. Move function
erased_sector_bitflips() into the same ifdef section as the only caller.
Signed-off-by: Christian Engelmayer <cengelma at gmx.at>
Reviewed-by: Jingoo Han <jg1.han at samsung.com>
Acked-by: Pekon Gupta <pekon at ti.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/omap2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 1ff49b8..1b800bc 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1237,6 +1237,7 @@ static int __maybe_unused omap_calculate_ecc_bch(struct mtd_info *mtd,
return 0;
}
+#ifdef CONFIG_MTD_NAND_OMAP_BCH
/**
* erased_sector_bitflips - count bit flips
* @data: data sector buffer
@@ -1276,7 +1277,6 @@ static int erased_sector_bitflips(u_char *data, u_char *oob,
return flip_bits;
}
-#ifdef CONFIG_MTD_NAND_OMAP_BCH
/**
* omap_elm_correct_data - corrects page data area in case error reported
* @mtd: MTD device structure
More information about the linux-mtd-cvs
mailing list