From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 15 Jan 2012 01:26:26 +0100 Subject: [U-Boot] [PATCH] omap3: board.c - Fix compile warnings In-Reply-To: References: <1326565959-29371-1-git-send-email-pali.rohar@gmail.com> <8345085.JyySKeOEAJ@pali> Message-ID: <201201150126.26881.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > On Sat, Jan 14, 2012 at 4:40 PM, Pali Roh?r wrote: > > 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 > >> > --- > >> > > >> > 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. > > Right, but if we move the function to be just before it's used, inside > the existing ifndef block we can remove the prototype instead. Yep, it's just an function ordering issue being solved here. M