From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Thu, 22 Mar 2012 10:45:47 +0100 Subject: [U-Boot] [PATCH] NAND: TI: fix warnings in omap_gpmc.c In-Reply-To: <4F6A2114.3000508@freescale.com> References: <1332329622-9556-1-git-send-email-sbabic@denx.de> <4F6A2114.3000508@freescale.com> Message-ID: <4F6AF4CB.7090404@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 21/03/2012 19:42, Scott Wood wrote: > 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 >> Cc: Tom Rini >> Cc: Scott Wood >> --- >> 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 >> >> 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))? Of yourse, you are right. We have already the macro __maybe_unused, I will use it ! Stefano -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================