From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] omap3: board.c - Fix compile warnings
Date: Sun, 15 Jan 2012 00:59:31 +0100 [thread overview]
Message-ID: <201201150059.31203.marek.vasut@gmail.com> (raw)
In-Reply-To: <8345085.JyySKeOEAJ@pali>
> On Saturday 14 January 2012 21:12:00 Marek Vasut wrote:
> > > * 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@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.
>
> No, function omap3_invalidate_l2_cache_secure is defined in block #ifndef
> CONFIG_SYS_L2CACHE_OFF. So declaration should be in #ifndef too.
Well ... I didn't object to that. I was just pointing out you're fixing forward
declaration to undefined function. You should make a separate patch for that and
explain it in the changelog so it's easily bisectable.
>
> > > 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.
>
> Function omap3_update_aux_cr is called only when CONFIG_SYS_L2CACHE_OFF is
> not defined, so adding #ifndef is needed.
Sigh ... move this function to the whole #ifndef block a few lines under that
function.
>
> > > static void omap3_setup_aux_cr(void)
> > > {
> >
> > Also, does this manifest on omap4 too?
> >
> > M
next prev parent reply other threads:[~2012-01-14 23:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-14 18:32 [U-Boot] [PATCH] omap3: board.c - Fix compile warnings Pali Rohár
2012-01-14 20:12 ` Marek Vasut
2012-01-14 20:13 ` Marek Vasut
2012-01-14 23:40 ` Pali Rohár
2012-01-14 23:59 ` Marek Vasut [this message]
2012-01-15 0:00 ` Tom Rini
2012-01-15 0:26 ` Marek Vasut
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=201201150059.31203.marek.vasut@gmail.com \
--to=marek.vasut@gmail.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