[U-Boot] [PATCH] omap3: board.c - Fix compile warnings
Marek Vasut
marek.vasut at gmail.com
Sat Jan 14 21:13:56 CET 2012
> > * This patch fix compile warnings when CONFIG_SYS_L2CACHE_OFF is enabled
> >
> > board.c:48:13: warning: ‘omap3_invalidate_l2_cache_secure’ declared
> >
> > ‘static’ but never defined board.c:373:13: warning: ‘omap3_update_aux_cr’
> > defined but not used
> >
> > Signed-off-by: Pali Rohár <pali.rohar at gmail.com>
> > ---
> >
> > arch/arm/cpu/armv7/omap3/board.c | 5 +++++
> > 1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/cpu/armv7/omap3/board.c
> > b/arch/arm/cpu/armv7/omap3/board.c index 1f33c63..52514ae 100644
> > --- a/arch/arm/cpu/armv7/omap3/board.c
> > +++ b/arch/arm/cpu/armv7/omap3/board.c
> > @@ -45,7 +45,10 @@
> >
> > /* Declarations */
> > extern omap3_sysinfo sysinfo;
> > static void omap3_setup_aux_cr(void);
> >
> > +
> > +#ifndef CONFIG_SYS_L2CACHE_OFF
> >
> > static void omap3_invalidate_l2_cache_secure(void);
> >
> > +#endif
>
> This is due to the ordering, right ? Now, split this into two patches,
> because you're actually doing two unrelated things.
>
> > static const struct gpio_bank gpio_bank_34xx[6] = {
> >
> > { (void *)OMAP34XX_GPIO1_BASE, METHOD_GPIO_24XX },
> >
> > @@ -370,6 +373,7 @@ static void omap3_update_aux_cr_secure(u32 set_bits,
> > u32 clear_bits) }
> >
> > }
> >
> > +#ifndef CONFIG_SYS_L2CACHE_OFF
> >
> > static void omap3_update_aux_cr(u32 set_bits, u32 clear_bits)
> > {
> >
> > u32 acr;
> >
> > @@ -382,6 +386,7 @@ static void omap3_update_aux_cr(u32 set_bits, u32
> > clear_bits) /* Write ACR - affects non-secure banked bits */
> >
> > asm volatile ("mcr p15, 0, %0, c1, c0, 1" : : "r" (acr));
> >
> > }
> >
> > +#endif
>
> Just move this function a few lines below instead of adding more CPP bloat.
>
> > static void omap3_setup_aux_cr(void)
> > {
>
> Also, does this manifest on omap4 too?
>
> M
And one last thing ... Cc appropriate maintainers please
More information about the U-Boot
mailing list