public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: omap2: Fix compilation warning
@ 2013-07-24 15:56 Olof Johansson
  2013-07-24 17:48 ` Gupta, Pekon
  0 siblings, 1 reply; 3+ messages in thread
From: Olof Johansson @ 2013-07-24 15:56 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: Pekon Gupta, linux-mtd, linux-kernel, linux-omap, David Woodhouse,
	Olof Johansson

fb1585bc13b (mtd: nand: omap2: clean-up BCHx_HW and BCHx_SW ECC
configurations in device_probe) introduced a warning when the new option
is disabled, i.e. with omap2plus_defconfig:

drivers/mtd/nand/omap2.c:1075:13: warning: 'omap3_enable_hwecc_bch' defined but not used [-Wunused-function]

Fix this by rescoping the ifdef. Also remove a redudant #endif/#ifdef
pair.

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 drivers/mtd/nand/omap2.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index c4c7e0d..cbf8b28 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1060,6 +1060,7 @@ static int omap_dev_ready(struct mtd_info *mtd)
 	}
 }
 
+#ifdef CONFIG_MTD_NAND_OMAP_BCH
 /**
  * omap3_enable_hwecc_bch - Program OMAP3 GPMC to perform BCH ECC correction
  * @mtd: MTD device structure
@@ -1141,7 +1142,6 @@ static void omap3_enable_hwecc_bch(struct mtd_info *mtd, int mode)
 	writel(ECCCLEAR | ECC1, info->reg.gpmc_ecc_control);
 }
 
-#ifdef CONFIG_MTD_NAND_ECC_BCH
 /**
  * omap3_calculate_ecc_bch4 - Generate 7 bytes of ECC bytes
  * @mtd: MTD device structure
@@ -1959,8 +1959,7 @@ static int omap_nand_probe(struct platform_device *pdev)
 		omap_oobinfo.oobfree->offset	= omap_oobinfo.eccpos[0] +
 							omap_oobinfo.eccbytes;
 		goto custom_ecc_layout;
-#endif
-#ifdef CONFIG_MTD_NAND_ECC_BCH
+
 	case OMAP_ECC_BCH8_CODE_HW_DETECTION_SW:
 		pr_info("using OMAP_ECC_BCH8_CODE_HW_DETECTION_SW ECC\n");
 		info->nand.ecc.mode		= NAND_ECC_HW;
-- 
1.7.10.4

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

* RE: [PATCH] mtd: nand: omap2: Fix compilation warning
  2013-07-24 15:56 [PATCH] mtd: nand: omap2: Fix compilation warning Olof Johansson
@ 2013-07-24 17:48 ` Gupta, Pekon
  2013-08-02 14:07   ` Artem Bityutskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Gupta, Pekon @ 2013-07-24 17:48 UTC (permalink / raw)
  To: Olof Johansson, Artem Bityutskiy
  Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, David Woodhouse

Hi Olof,

> 
> fb1585bc13b (mtd: nand: omap2: clean-up BCHx_HW and BCHx_SW ECC
> configurations in device_probe) introduced a warning when the new option
> is disabled, i.e. with omap2plus_defconfig:
> 
> drivers/mtd/nand/omap2.c:1075:13: warning: 'omap3_enable_hwecc_bch'
> defined but not used [-Wunused-function]
> 
> Fix this by rescoping the ifdef. Also remove a redudant #endif/#ifdef
> pair.
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---

Thanks much..
But just to remind, this commit fb1585b in linux-next needs to be reverted.
This patch is leftover by mistake because other dependent patches of 
this series were dropped. This will not only break omap2-nand driver,
but might also break the build.

http://lists.infradead.org/pipermail/linux-mtd/2013-July/047441.html

Please let me know, if something needs to be done from my-side to
get this reverted. I have already re-sent a updated version of this series
with fixes & copying devicetree-discuss.

http://lists.infradead.org/pipermail/linux-mtd/2013-July/047530.html


with regards, pekon

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

* Re: [PATCH] mtd: nand: omap2: Fix compilation warning
  2013-07-24 17:48 ` Gupta, Pekon
@ 2013-08-02 14:07   ` Artem Bityutskiy
  0 siblings, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2013-08-02 14:07 UTC (permalink / raw)
  To: Gupta, Pekon
  Cc: Olof Johansson, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	David Woodhouse

On Wed, 2013-07-24 at 17:48 +0000, Gupta, Pekon wrote:
> Hi Olof,
> 
> > 
> > fb1585bc13b (mtd: nand: omap2: clean-up BCHx_HW and BCHx_SW ECC
> > configurations in device_probe) introduced a warning when the new option
> > is disabled, i.e. with omap2plus_defconfig:
> > 
> > drivers/mtd/nand/omap2.c:1075:13: warning: 'omap3_enable_hwecc_bch'
> > defined but not used [-Wunused-function]
> > 
> > Fix this by rescoping the ifdef. Also remove a redudant #endif/#ifdef
> > pair.
> > 
> > Signed-off-by: Olof Johansson <olof@lixom.net>
> > ---
> 
> Thanks much..
> But just to remind, this commit fb1585b in linux-next needs to be reverted.
> This patch is leftover by mistake because other dependent patches of 
> this series were dropped. This will not only break omap2-nand driver,
> but might also break the build.

Just dropped it, thanks!

-- 
Best Regards,
Artem Bityutskiy

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

end of thread, other threads:[~2013-08-02 14:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-24 15:56 [PATCH] mtd: nand: omap2: Fix compilation warning Olof Johansson
2013-07-24 17:48 ` Gupta, Pekon
2013-08-02 14:07   ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox