mtd: nand: omap: fix compile warning on ‘erased_sector_bitflips’
Subsystems (2)
PATCH 1/1 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.
--- drivers/mtd/nand/omap2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/omap2.c +1 -1
@@ -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
Signature · 1 line
1.8.3.2
Quoted 8 lines · Christian Engelmayer
Commit
2c9f2365(mtd: nand: omap: ecc.calculate: mergeomap3_calculate_ecc_bch4inomap_calculate_ecc_bch) introduced minor compile warning "‘erased_sector_bitflips’ defined but not used [-Wunused-function]" when compiling withoutCONFIG_MTD_NAND_OMAP_BCH. Move functionerased_sector_bitflips()into the same ifdef section as the only caller.Signed-off-by Christian Engelmayer <[email protected]>
Best regards,
Jingoo Han
Quoted 26 lines
--- drivers/mtd/nand/omap2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mtd/nand/omap2.c +1
-2@@ -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
Gupta, Pekon
Acked-byQuoted 9 lines
From: Jingoo Han [mailto:[email protected]]
Quoted 8 lines · Christian Engelmayer
Commit
2c9f2365(mtd: nand: omap: ecc.calculate: mergeomap3_calculate_ecc_bch4inomap_calculate_ecc_bch) introduced minor compile warning "‘erased_sector_bitflips’ defined but not used [-Wunused-function]" when compiling withoutCONFIG_MTD_NAND_OMAP_BCH. Move functionerased_sector_bitflips()into the same ifdef section as the only caller.
Quoted 4 lines
Quoted 1 line
Signed-off-by Christian Engelmayer <[email protected]>Reviewed-by Jingoo Han <[email protected]>
Thanks for the patch..
With regards, pekon
Brian Norris
AppliedQuoted 9 lines · Pekon Gupta
Quoted 9 lines
From: Jingoo Han [mailto:[email protected]]
Quoted 8 lines · Christian Engelmayer
Commit
2c9f2365(mtd: nand: omap: ecc.calculate: mergeomap3_calculate_ecc_bch4inomap_calculate_ecc_bch) introduced minor compile warning "‘erased_sector_bitflips’ defined but not used [-Wunused-function]" when compiling withoutCONFIG_MTD_NAND_OMAP_BCH. Move functionerased_sector_bitflips()into the same ifdef section as the only caller.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Christian Engelmayer <[email protected]>Reviewed-by Jingoo Han <[email protected]>Thanks for the patch..
Acked-by Pekon Gupta <[email protected]>
Pushed to l2-mtd.git. Thanks!
Brian