From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] NAND: TI: fix warnings in omap_gpmc.c
Date: Wed, 21 Mar 2012 13:42:28 -0500 [thread overview]
Message-ID: <4F6A2114.3000508@freescale.com> (raw)
In-Reply-To: <1332329622-9556-1-git-send-email-sbabic@denx.de>
On 03/21/2012 06:33 AM, Stefano Babic wrote:
> The following warnings are reported for boards using SOFT ECC.
>
> omap_gpmc.c:33:30: warning: 'hw_nand_oob' defined but not used
> omap_gpmc.c:78:13: warning: 'omap_hwecc_init' defined but not used
> omap_gpmc.c:116:12: warning: 'omap_correct_data' defined but not used
> omap_gpmc.c:182:12: warning: 'omap_calculate_ecc' defined but not used
> omap_gpmc.c:208:13: warning: 'omap_enable_hwecc' defined but not used
>
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@ti.com>
> Cc: Scott Wood <scottwood@freescale.com>
> ---
> drivers/mtd/nand/omap_gpmc.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
> index 1dfe074..3a9baff 100644
> --- a/drivers/mtd/nand/omap_gpmc.c
> +++ b/drivers/mtd/nand/omap_gpmc.c
> @@ -30,7 +30,10 @@
> #include <nand.h>
>
> static uint8_t cs;
> +#if !defined(CONFIG_SPL_BUILD) || \
> + (defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_NAND_SOFTECC))
> static struct nand_ecclayout hw_nand_oob = GPMC_NAND_HW_ECC_LAYOUT;
> +#endif
>
> /*
> * omap_nand_hwcontrol - Set the address pointers corretly for the
> @@ -69,6 +72,8 @@ int omap_spl_dev_ready(struct mtd_info *mtd)
> }
> #endif
>
> +#if !defined(CONFIG_SPL_BUILD) || \
> + (defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_NAND_SOFTECC))
> /*
> * omap_hwecc_init - Initialize the Hardware ECC for NAND flash in
> * GPMC controller
> @@ -231,6 +236,7 @@ static void omap_enable_hwecc(struct mtd_info *mtd, int32_t mode)
> break;
> }
> }
> +#endif
>
> #ifndef CONFIG_SPL_BUILD
> /*
Maybe just use __attribute__((unused))?
Or provide this ifdeffery once at the top of the file, to produce a
single symbol that indicates whether you're using hwecc in this file.
-Scott
next prev parent reply other threads:[~2012-03-21 18:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 11:33 [U-Boot] [PATCH] NAND: TI: fix warnings in omap_gpmc.c Stefano Babic
2012-03-21 18:42 ` Scott Wood [this message]
2012-03-22 9:45 ` Stefano Babic
2012-03-22 9:56 ` [U-Boot] [PATCH V2] " Stefano Babic
2012-03-22 20:02 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F6A2114.3000508@freescale.com \
--to=scottwood@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox