diff mbox

[U-Boot,1/4] cmd_bootm: fix compilation warning for assigned but never used variable

Message ID 1340482108-18468-1-git-send-email-otavio@ossystems.com.br
State Rejected
Headers show

Commit Message

Otavio Salvador June 23, 2012, 8:08 p.m. UTC
The iflag variable was holding the return of disable_interrupts call
but the value was not used in the method so we drop the assignment.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 common/cmd_bootm.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Otavio Salvador June 23, 2012, 8:07 p.m. UTC | #1
Ignore this; this has a new version sent to mailing list and this good
in the middle.

On Sat, Jun 23, 2012 at 5:08 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  board/freescale/mx53loco/mx53loco.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
> index 445d022..9fae5e8 100644
> --- a/board/freescale/mx53loco/mx53loco.c
> +++ b/board/freescale/mx53loco/mx53loco.c
> @@ -413,6 +413,8 @@ int board_early_init_f(void)
>        return 0;
>  }
>
> +/* Needs to be available on the board file to be called in board_init,
> + * instead of normal order  */
>  int print_cpuinfo(void)
>  {
>        u32 cpurev;
> --
> 1.7.10
>
Marek Vasut June 23, 2012, 8:09 p.m. UTC | #2
Dear Otavio Salvador,

> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  board/freescale/mx53loco/mx53loco.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/board/freescale/mx53loco/mx53loco.c
> b/board/freescale/mx53loco/mx53loco.c index 445d022..9fae5e8 100644
> --- a/board/freescale/mx53loco/mx53loco.c
> +++ b/board/freescale/mx53loco/mx53loco.c
> @@ -413,6 +413,8 @@ int board_early_init_f(void)
>  	return 0;
>  }
> 
> +/* Needs to be available on the board file to be called in board_init,
> + * instead of normal order  */

Invalid multiline comment ;-)

>  int print_cpuinfo(void)
>  {
>  	u32 cpurev;

Best regards,
Marek Vasut
Wolfgang Denk June 23, 2012, 10:56 p.m. UTC | #3
Dear Otavio Salvador,

In message <1340482108-18468-1-git-send-email-otavio@ossystems.com.br> you wrote:
> The iflag variable was holding the return of disable_interrupts call
> but the value was not used in the method so we drop the assignment.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  common/cmd_bootm.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Please rebase and update your patches; this specific problem for
example has been fixed long ago:

commit a075a79f98cc3f5972a2ed80551c0873217aef7d
Author: Anatolij Gustschin <agust@denx.de>
Date:   Sat May 19 05:38:19 2012 +0000

    common/cmd_bootm.c: Fix GCC 4.6 warning


Best regards,

Wolfgang Denk
Otavio Salvador June 23, 2012, 11 p.m. UTC | #4
On Sat, Jun 23, 2012 at 7:56 PM, Wolfgang Denk <wd@denx.de> wrote:
> Please rebase and update your patches; this specific problem for
> example has been fixed long ago:
>
> commit a075a79f98cc3f5972a2ed80551c0873217aef7d
> Author: Anatolij Gustschin <agust@denx.de>
> Date:   Sat May 19 05:38:19 2012 +0000
>
>    common/cmd_bootm.c: Fix GCC 4.6 warning

Ouch! I am basing my work on u-boot-imx; I think the imx tree needs to
be rebased so we can have a good base of work.
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)
 	/*