diff mbox

[U-Boot,1/3] BOOT: Fix unused variable issue when enabling bootz support

Message ID 1339617312-7760-1-git-send-email-swarren@wwwdotorg.org
State Not Applicable
Headers show

Commit Message

Stephen Warren June 13, 2012, 7:55 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

cmd_bootm.c: In function 'do_bootz':
cmd_bootm.c:1590:9: warning: variable 'iflag' set but not used [-Wunused-but-set-variable]

Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
I think this is best taken through the Tegra tree, since it's needed to
avoid introducing warnings when enabling CONFIG_CMD_BOOTZ, which the next
patch enables, and we don't want MAKEALL -s tegra2 to suddenly start
giving warnings.
---
 common/cmd_bootm.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Marek Vasut June 13, 2012, 9:03 p.m. UTC | #1
Dear Stephen Warren,

> From: Stephen Warren <swarren@nvidia.com>
> 
> cmd_bootm.c: In function 'do_bootz':
> cmd_bootm.c:1590:9: warning: variable 'iflag' set but not used
> [-Wunused-but-set-variable]

It can be applied directly too ...

Acked-by: Marek Vasut <marex@denx.de>

> Cc: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> I think this is best taken through the Tegra tree, since it's needed to
> avoid introducing warnings when enabling CONFIG_CMD_BOOTZ, which the next
> patch enables, and we don't want MAKEALL -s tegra2 to suddenly start
> giving warnings.
> ---
>  common/cmd_bootm.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> index 5685232..45e726a 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -1587,7 +1587,6 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag,
> int argc,
> 
>  static int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const
> argv[]) {
> -	ulong		iflag;
>  	bootm_headers_t	images;
> 
>  	if (bootz_start(cmdtp, flag, argc, argv, &images))
> @@ -1598,7 +1597,7 @@ static int do_bootz(cmd_tbl_t *cmdtp, int flag, int
> argc, char * const argv[]) * overwrite all exception vector code, so we
> cannot easily
>  	 * recover from any failures any more...
>  	 */
> -	iflag = disable_interrupts();
> +	disable_interrupts();
> 
>  #if defined(CONFIG_CMD_USB)
>  	/*

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 5685232..45e726a 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -1587,7 +1587,6 @@  static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
 
 static int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
-	ulong		iflag;
 	bootm_headers_t	images;
 
 	if (bootz_start(cmdtp, flag, argc, argv, &images))
@@ -1598,7 +1597,7 @@  static int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	 * overwrite all exception vector code, so we cannot easily
 	 * recover from any failures any more...
 	 */
-	iflag = disable_interrupts();
+	disable_interrupts();
 
 #if defined(CONFIG_CMD_USB)
 	/*