All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: omap: fix compile warning on ‘erased_sector_bitflips’
@ 2014-04-14 22:32 ` Christian Engelmayer
  0 siblings, 0 replies; 8+ messages in thread
From: Christian Engelmayer @ 2014-04-14 22:32 UTC (permalink / raw)
  To: Brian Norris
  Cc: David Woodhouse, Pekon Gupta, Jingoo Han, Artem Bityutskiy,
	linux-mtd, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]

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>
---
 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
-- 
1.8.3.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-04-16  6:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-14 22:32 [PATCH] mtd: nand: omap: fix compile warning on ‘erased_sector_bitflips’ Christian Engelmayer
2014-04-14 22:32 ` Christian Engelmayer
2014-04-15  0:33 ` Jingoo Han
2014-04-15  0:33   ` Jingoo Han
2014-04-15  3:58   ` Gupta, Pekon
2014-04-15  3:58     ` Gupta, Pekon
2014-04-16  6:21     ` Brian Norris
2014-04-16  6:21       ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.