diff mbox

[U-Boot,7/9] GCC4.6: Use dst instead of l2srbar in cpu_early_init.c

Message ID 1319535462-20693-8-git-send-email-marek.vasut@gmail.com
State Accepted
Headers show

Commit Message

Marek Vasut Oct. 25, 2011, 9:37 a.m. UTC
cpu_init_early.c: In function 'cpu_init_early_f':
cpu_init_early.c:74: warning: 'l2srbar' may be used uninitialized in this
function

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Kumar Gala Oct. 25, 2011, 1:16 p.m. UTC | #1
On Oct 25, 2011, at 4:37 AM, Marek Vasut wrote:

> cpu_init_early.c: In function 'cpu_init_early_f':
> cpu_init_early.c:74: warning: 'l2srbar' may be used uninitialized in this
> function
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
> arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)

Please hold on this, waiting for a proper fix to the code from Poonam.

> 
> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> index 4ef3c9a..091af7c 100644
> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> @@ -71,7 +71,7 @@ void cpu_init_early_f(void)
> #endif
> #if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && !defined(CONFIG_SYS_RAMBOOT)
> 	ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
> -	u32  *l2srbar, *dst, *src;
> +	u32  *dst, *src;
> 	void (*setup_ifc_sram)(void);
> #endif
> 
> @@ -137,7 +137,7 @@ void cpu_init_early_f(void)
> 	dst = (u32 *) SRAM_BASE_ADDR;
> 	src = (u32 *) setup_ifc;
> 	for (i = 0; i < 1024; i++)
> -		*l2srbar++ = *src++;
> +		*dst++ = *src++;
> 
> 	setup_ifc_sram();
> 
> -- 
> 1.7.6.3
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Marek Vasut Oct. 25, 2011, 1:25 p.m. UTC | #2
> On Oct 25, 2011, at 4:37 AM, Marek Vasut wrote:
> > cpu_init_early.c: In function 'cpu_init_early_f':
> > cpu_init_early.c:74: warning: 'l2srbar' may be used uninitialized in this
> > function
> > 
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > Cc: Wolfgang Denk <wd@denx.de>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Mike Frysinger <vapier@gentoo.org>
> > ---
> > arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> 
> Please hold on this, waiting for a proper fix to the code from Poonam.

Kumar, I don't mind removing this one. Thanks for looking through the series, 
it's very appreciated!

Cheers
Wolfgang Denk Oct. 27, 2011, 9:56 p.m. UTC | #3
Dear Marek Vasut,

In message <1319535462-20693-8-git-send-email-marek.vasut@gmail.com> you wrote:
> cpu_init_early.c: In function 'cpu_init_early_f':
> cpu_init_early.c:74: warning: 'l2srbar' may be used uninitialized in this
> function
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index 4ef3c9a..091af7c 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -71,7 +71,7 @@  void cpu_init_early_f(void)
 #endif
 #if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && !defined(CONFIG_SYS_RAMBOOT)
 	ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
-	u32  *l2srbar, *dst, *src;
+	u32  *dst, *src;
 	void (*setup_ifc_sram)(void);
 #endif
 
@@ -137,7 +137,7 @@  void cpu_init_early_f(void)
 	dst = (u32 *) SRAM_BASE_ADDR;
 	src = (u32 *) setup_ifc;
 	for (i = 0; i < 1024; i++)
-		*l2srbar++ = *src++;
+		*dst++ = *src++;
 
 	setup_ifc_sram();