]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mtd: nand: omap: fix compile warning on ‘erased_sector_bitflips’
authorChristian Engelmayer <cengelma@gmx.at>
Mon, 14 Apr 2014 22:32:05 +0000 (00:32 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 16 Apr 2014 06:20:30 +0000 (23:20 -0700)
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@gmx.at>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/omap2.c

index 1ff49b80bdaf7e3a454c02574165d1a59a04a72b..1b800bcda5a47550505b2b4910304b414ed53beb 100644 (file)
@@ -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