* [U-Boot] [PATCH 01/10] drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:18 ` Heiko Schocher
2011-11-19 23:12 ` [U-Boot] [PATCH 02/10] drivers/mtd/onenand/samsung.c: " Anatolij Gustschin
` (8 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
musb_hcd.c: In function 'submit_control_msg':
musb_hcd.c:851:6: warning: variable 'csr' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
drivers/usb/musb/musb_hcd.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 974bb31..325edb9 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -848,7 +848,6 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int len, struct devrequest *setup)
{
int devnum = usb_pipedevice(pipe);
- u16 csr;
u8 devspeed;
#ifdef MUSB_NO_MULTIPOINT
@@ -862,7 +861,7 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
/* select control endpoint */
writeb(MUSB_CONTROL_EP, &musbr->index);
- csr = readw(&musbr->txcsr);
+ readw(&musbr->txcsr);
#ifndef MUSB_NO_MULTIPOINT
/* target addr and (for multipoint) hub addr/port */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 01/10] drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning
2011-11-19 23:12 ` [U-Boot] [PATCH 01/10] drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning Anatolij Gustschin
@ 2011-11-23 7:18 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:18 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> musb_hcd.c: In function 'submit_control_msg':
> musb_hcd.c:851:6: warning: variable 'csr' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> drivers/usb/musb/musb_hcd.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread
* [U-Boot] [PATCH 02/10] drivers/mtd/onenand/samsung.c: Fix GCC 4.6 warning
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
2011-11-19 23:12 ` [U-Boot] [PATCH 01/10] drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:20 ` Heiko Schocher
2011-11-19 23:12 ` [U-Boot] [PATCH 03/10] board/ronetix/pm9263/pm9263.c: " Anatolij Gustschin
` (7 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
samsung.c: In function 's3c_onenand_check_lock_status':
samsung.c:486:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
drivers/mtd/onenand/samsung.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index 20b4912..ff59064 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -483,12 +483,11 @@ static void s3c_onenand_check_lock_status(struct mtd_info *mtd)
{
struct onenand_chip *this = mtd->priv;
unsigned int block, end;
- int tmp;
end = this->chipsize >> this->erase_shift;
for (block = 0; block < end; block++) {
- tmp = s3c_read_cmd(CMD_MAP_01(onenand->mem_addr(block, 0, 0)));
+ s3c_read_cmd(CMD_MAP_01(onenand->mem_addr(block, 0, 0)));
if (readl(&onenand->reg->int_err_stat) & LOCKED_BLK) {
printf("block %d is write-protected!\n", block);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 02/10] drivers/mtd/onenand/samsung.c: Fix GCC 4.6 warning
2011-11-19 23:12 ` [U-Boot] [PATCH 02/10] drivers/mtd/onenand/samsung.c: " Anatolij Gustschin
@ 2011-11-23 7:20 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:20 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> samsung.c: In function 's3c_onenand_check_lock_status':
> samsung.c:486:6: warning: variable 'tmp' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> drivers/mtd/onenand/samsung.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread
* [U-Boot] [PATCH 03/10] board/ronetix/pm9263/pm9263.c: Fix GCC 4.6 warning
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
2011-11-19 23:12 ` [U-Boot] [PATCH 01/10] drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning Anatolij Gustschin
2011-11-19 23:12 ` [U-Boot] [PATCH 02/10] drivers/mtd/onenand/samsung.c: " Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:21 ` Heiko Schocher
2011-11-19 23:12 ` [U-Boot] [PATCH 04/10] drivers/net/lan91c96.c: " Anatolij Gustschin
` (6 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
pm9263.c: In function 'pm9263_lcd_hw_psram_init':
pm9263.c:167:20: warning: variable 'x' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
board/ronetix/pm9263/pm9263.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c
index b0f7ea6..335efba 100644
--- a/board/ronetix/pm9263/pm9263.c
+++ b/board/ronetix/pm9263/pm9263.c
@@ -164,7 +164,6 @@ void lcd_disable(void)
/* Initialize the PSRAM memory */
static int pm9263_lcd_hw_psram_init(void)
{
- volatile uint16_t x;
unsigned long csa;
struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC1;
struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
@@ -196,14 +195,14 @@ static int pm9263_lcd_hw_psram_init(void)
at91_set_pio_value(PSRAM_CRE_PIN, 0); /* set PSRAM_CRE_PIN to '0' */
/* PSRAM: write BCR */
- x = readw(PSRAM_CTRL_REG);
- x = readw(PSRAM_CTRL_REG);
+ readw(PSRAM_CTRL_REG);
+ readw(PSRAM_CTRL_REG);
writew(1, PSRAM_CTRL_REG); /* 0 - RCR,1 - BCR */
writew(0x9d4f, PSRAM_CTRL_REG); /* write the BCR */
/* write RCR of the PSRAM */
- x = readw(PSRAM_CTRL_REG);
- x = readw(PSRAM_CTRL_REG);
+ readw(PSRAM_CTRL_REG);
+ readw(PSRAM_CTRL_REG);
writew(0, PSRAM_CTRL_REG); /* 0 - RCR,1 - BCR */
/* set RCR; 0x10-async mode,0x90-page mode */
writew(0x90, PSRAM_CTRL_REG);
@@ -222,8 +221,8 @@ static int pm9263_lcd_hw_psram_init(void)
at91_set_pio_value(PSRAM_CRE_PIN, 1); /* set PSRAM_CRE_PIN to '1' */
/* write RCR of the PSRAM */
- x = readw(PSRAM_CTRL_REG);
- x = readw(PSRAM_CTRL_REG);
+ readw(PSRAM_CTRL_REG);
+ readw(PSRAM_CTRL_REG);
writew(0, PSRAM_CTRL_REG); /* 0 - RCR,1 - BCR */
/* set RCR;0x10-async mode,0x90-page mode */
writew(0x90, PSRAM_CTRL_REG);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 03/10] board/ronetix/pm9263/pm9263.c: Fix GCC 4.6 warning
2011-11-19 23:12 ` [U-Boot] [PATCH 03/10] board/ronetix/pm9263/pm9263.c: " Anatolij Gustschin
@ 2011-11-23 7:21 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:21 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> pm9263.c: In function 'pm9263_lcd_hw_psram_init':
> pm9263.c:167:20: warning: variable 'x' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> board/ronetix/pm9263/pm9263.c | 13 ++++++-------
> 1 files changed, 6 insertions(+), 7 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread
* [U-Boot] [PATCH 04/10] drivers/net/lan91c96.c: Fix GCC 4.6 warning
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
` (2 preceding siblings ...)
2011-11-19 23:12 ` [U-Boot] [PATCH 03/10] board/ronetix/pm9263/pm9263.c: " Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:21 ` Heiko Schocher
2011-11-19 23:12 ` [U-Boot] [PATCH 05/10] arch/arm/cpu/arm926ejs/omap/cpuinfo.c: Fix GCC 4.6 warnings Anatolij Gustschin
` (5 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
lan91c96.c: In function 'dump_memory_info':
lan91c96.c:157:7: warning: variable 'mem_info' set but not used
[-Wunused-but-set-variable]
lan91c96.c: In function 'smc_send_packet':
lan91c96.c:320:16: warning: variable 'ioaddr' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
drivers/net/lan91c96.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 883f3a7..24b28da 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -63,6 +63,7 @@
#include <malloc.h>
#include "lan91c96.h"
#include <net.h>
+#include <linux/compiler.h>
/*------------------------------------------------------------------------
*
@@ -154,7 +155,7 @@ static void smc_set_mac_addr(const unsigned char *addr)
***********************************************/
void dump_memory_info(struct eth_device *dev)
{
- word mem_info;
+ __maybe_unused word mem_info;
word old_bank;
old_bank = SMC_inw(dev, LAN91C96_BANK_SELECT) & 0xF;
@@ -317,7 +318,6 @@ static int smc_send_packet(struct eth_device *dev, volatile void *packet,
int packet_length)
{
byte packet_no;
- unsigned long ioaddr;
byte *buf;
int length;
int numPages;
@@ -381,9 +381,6 @@ static int smc_send_packet(struct eth_device *dev, volatile void *packet,
dev->name, try);
/* I can send the packet now.. */
-
- ioaddr = dev->iobase;
-
buf = (byte *) packet;
/* If I get here, I _know_ there is a packet slot waiting for me */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 04/10] drivers/net/lan91c96.c: Fix GCC 4.6 warning
2011-11-19 23:12 ` [U-Boot] [PATCH 04/10] drivers/net/lan91c96.c: " Anatolij Gustschin
@ 2011-11-23 7:21 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:21 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> lan91c96.c: In function 'dump_memory_info':
> lan91c96.c:157:7: warning: variable 'mem_info' set but not used
> [-Wunused-but-set-variable]
> lan91c96.c: In function 'smc_send_packet':
> lan91c96.c:320:16: warning: variable 'ioaddr' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> drivers/net/lan91c96.c | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread
* [U-Boot] [PATCH 05/10] arch/arm/cpu/arm926ejs/omap/cpuinfo.c: Fix GCC 4.6 warnings
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
` (3 preceding siblings ...)
2011-11-19 23:12 ` [U-Boot] [PATCH 04/10] drivers/net/lan91c96.c: " Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:22 ` Heiko Schocher
2011-11-19 23:12 ` [U-Boot] [PATCH 06/10] drivers/net/cs8900.c: Fix GCC 4.6 warning Anatolij Gustschin
` (4 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
cpuinfo.c: In function 'print_cpuinfo':
cpuinfo.c:155:6: warning: variable 'system_serial_low' set but not used
[-Wunused-but-set-variable]
cpuinfo.c:154:6: warning: variable 'system_serial_high' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
arch/arm/cpu/arm926ejs/omap/cpuinfo.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/omap/cpuinfo.c b/arch/arm/cpu/arm926ejs/omap/cpuinfo.c
index 0052dab..02332ee 100644
--- a/arch/arm/cpu/arm926ejs/omap/cpuinfo.c
+++ b/arch/arm/cpu/arm926ejs/omap/cpuinfo.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <command.h>
+#include <linux/compiler.h>
#if defined(CONFIG_DISPLAY_CPUINFO) && defined(CONFIG_OMAP)
@@ -151,8 +152,8 @@ int print_cpuinfo (void)
u8 die_rev;
u32 omap_id;
u8 cpu_type;
- u32 system_serial_high;
- u32 system_serial_low;
+ __maybe_unused u32 system_serial_high;
+ __maybe_unused u32 system_serial_low;
u32 system_rev = 0;
jtag_id = omap_get_jtag_id();
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 05/10] arch/arm/cpu/arm926ejs/omap/cpuinfo.c: Fix GCC 4.6 warnings
2011-11-19 23:12 ` [U-Boot] [PATCH 05/10] arch/arm/cpu/arm926ejs/omap/cpuinfo.c: Fix GCC 4.6 warnings Anatolij Gustschin
@ 2011-11-23 7:22 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:22 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> cpuinfo.c: In function 'print_cpuinfo':
> cpuinfo.c:155:6: warning: variable 'system_serial_low' set but not used
> [-Wunused-but-set-variable]
> cpuinfo.c:154:6: warning: variable 'system_serial_high' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> arch/arm/cpu/arm926ejs/omap/cpuinfo.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread
* [U-Boot] [PATCH 06/10] drivers/net/cs8900.c: Fix GCC 4.6 warning
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
` (4 preceding siblings ...)
2011-11-19 23:12 ` [U-Boot] [PATCH 05/10] arch/arm/cpu/arm926ejs/omap/cpuinfo.c: Fix GCC 4.6 warnings Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:22 ` Heiko Schocher
2011-11-19 23:12 ` [U-Boot] [PATCH 07/10] board/lubbock/flash.c: Fix GCC 4.6 warnings Anatolij Gustschin
` (3 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
cs8900.c: In function 'get_reg_init_bus':
cs8900.c:69:14: warning: variable 'c' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
drivers/net/cs8900.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 9424fb2..e04a784 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -66,15 +66,14 @@
static u16 get_reg_init_bus(struct eth_device *dev, int regno)
{
/* force 16 bit busmode */
- volatile u8 c;
struct cs8900_priv *priv = (struct cs8900_priv *)(dev->priv);
uint8_t volatile * const iob = (uint8_t volatile * const)dev->iobase;
- c = readb(iob);
- c = readb(iob + 1);
- c = readb(iob);
- c = readb(iob + 1);
- c = readb(iob);
+ readb(iob);
+ readb(iob + 1);
+ readb(iob);
+ readb(iob + 1);
+ readb(iob);
REG_WRITE(regno, &priv->regs->pptr);
return REG_READ(&priv->regs->pdata);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 06/10] drivers/net/cs8900.c: Fix GCC 4.6 warning
2011-11-19 23:12 ` [U-Boot] [PATCH 06/10] drivers/net/cs8900.c: Fix GCC 4.6 warning Anatolij Gustschin
@ 2011-11-23 7:22 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:22 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> cs8900.c: In function 'get_reg_init_bus':
> cs8900.c:69:14: warning: variable 'c' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> drivers/net/cs8900.c | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread
* [U-Boot] [PATCH 07/10] board/lubbock/flash.c: Fix GCC 4.6 warnings
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
` (5 preceding siblings ...)
2011-11-19 23:12 ` [U-Boot] [PATCH 06/10] drivers/net/cs8900.c: Fix GCC 4.6 warning Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:22 ` Heiko Schocher
2011-11-19 23:12 ` [U-Boot] [PATCH 08/10] board/mx1ads/syncflash.c: " Anatolij Gustschin
` (2 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
flash.c: In function 'flash_erase':
flash.c:223:6: warning: variable 'flag' set but not used [-Wunused-but-set-variable]
flash.c: In function 'write_data':
flash.c:392:6: warning: variable 'flag' set but not used [-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
board/lubbock/flash.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/board/lubbock/flash.c b/board/lubbock/flash.c
index e1e7807..bf8f0c9 100644
--- a/board/lubbock/flash.c
+++ b/board/lubbock/flash.c
@@ -220,7 +220,7 @@ static ulong flash_get_size (FPW *addr, flash_info_t *info)
int flash_erase (flash_info_t *info, int s_first, int s_last)
{
- int flag, prot, sect;
+ int prot, sect;
ulong type, start;
int rcode = 0;
@@ -255,7 +255,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
}
/* Disable interrupts which might cause a timeout here */
- flag = disable_interrupts ();
+ disable_interrupts();
/* Start erase on unprotected sectors */
for (sect = s_first; sect <= s_last; sect++) {
@@ -389,7 +389,6 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
{
FPWV *addr = (FPWV *) dest;
ulong status;
- int flag;
ulong start;
/* Check if Flash is (sufficiently) erased */
@@ -398,7 +397,7 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
return (2);
}
/* Disable interrupts which might cause a timeout here */
- flag = disable_interrupts ();
+ disable_interrupts();
*addr = (FPW) 0x00400040; /* write setup */
*addr = data;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 07/10] board/lubbock/flash.c: Fix GCC 4.6 warnings
2011-11-19 23:12 ` [U-Boot] [PATCH 07/10] board/lubbock/flash.c: Fix GCC 4.6 warnings Anatolij Gustschin
@ 2011-11-23 7:22 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:22 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> flash.c: In function 'flash_erase':
> flash.c:223:6: warning: variable 'flag' set but not used [-Wunused-but-set-variable]
> flash.c: In function 'write_data':
> flash.c:392:6: warning: variable 'flag' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> board/lubbock/flash.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread
* [U-Boot] [PATCH 08/10] board/mx1ads/syncflash.c: Fix GCC 4.6 warnings
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
` (6 preceding siblings ...)
2011-11-19 23:12 ` [U-Boot] [PATCH 07/10] board/lubbock/flash.c: Fix GCC 4.6 warnings Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:23 ` Heiko Schocher
2011-11-19 23:12 ` [U-Boot] [PATCH 09/10] board/mx1ads/mx1ads.c: Fix GCC 4.6 warning Anatolij Gustschin
2011-11-19 23:12 ` [U-Boot] [PATCH 10/10] common/cmd_bootm.c: Fix GCC 4.6 warnings Anatolij Gustschin
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
syncflash.c: In function 'SF_SR':
syncflash.c:60:10: warning: variable 'tmp1' set but not used
[-Wunused-but-set-variable]
syncflash.c: In function 'SF_PrechargeAll':
syncflash.c:96:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
mx1ads.c: In function 'board_early_init_f':
mx1ads.c:83:24: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
syncflash.c: In function 'SF_Erase':
syncflash.c:112:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
syncflash.c: In function 'flash_init':
syncflash.c:155:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
board/mx1ads/syncflash.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/board/mx1ads/syncflash.c b/board/mx1ads/syncflash.c
index 7331efa..61a882e 100644
--- a/board/mx1ads/syncflash.c
+++ b/board/mx1ads/syncflash.c
@@ -57,7 +57,7 @@ flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips
/* Get Status register */
u32 SF_SR(void) {
- u32 tmp,tmp1;
+ u32 tmp;
reg_SFCTL = CMD_PROGRAM;
tmp = __REG(CONFIG_SYS_FLASH_BASE);
@@ -65,7 +65,7 @@ u32 SF_SR(void) {
reg_SFCTL = CMD_NORMAL;
reg_SFCTL = CMD_LCR; /* Activate LCR Mode */
- tmp1 = __REG(CONFIG_SYS_FLASH_BASE + LCR_SR_CLEAR);
+ __REG(CONFIG_SYS_FLASH_BASE + LCR_SR_CLEAR);
return tmp;
}
@@ -93,10 +93,10 @@ u8 SF_Ready(void) {
/* Issue the precharge all command */
void SF_PrechargeAll(void) {
- u32 tmp;
-
- reg_SFCTL = CMD_PREC; /* Set Precharge Command */
- tmp = __REG(CONFIG_SYS_FLASH_BASE + SYNCFLASH_A10); /* Issue Precharge All Command */
+ /* Set Precharge Command */
+ reg_SFCTL = CMD_PREC;
+ /* Issue Precharge All Command */
+ __REG(CONFIG_SYS_FLASH_BASE + SYNCFLASH_A10);
}
/* set SyncFlash to normal mode */
@@ -109,13 +109,12 @@ void SF_Normal(void) {
/* Erase SyncFlash */
void SF_Erase(u32 RowAddress) {
- u32 tmp;
reg_SFCTL = CMD_NORMAL;
- tmp = __REG(RowAddress);
+ __REG(RowAddress);
reg_SFCTL = CMD_PREC;
- tmp = __REG(RowAddress);
+ __REG(RowAddress);
reg_SFCTL = CMD_LCR; /* Set LCR mode */
__REG(RowAddress + LCR_ERASE_CONFIRM) = 0; /* Issue Erase Setup Command */
@@ -152,7 +151,6 @@ void SF_NvmodeWrite(void) {
ulong flash_init(void) {
int i, j;
- u32 tmp;
/* Turn on CSD1 for negating RESETSF of SyncFLash */
@@ -160,7 +158,7 @@ ulong flash_init(void) {
udelay(200);
reg_SFCTL = CMD_LMR; /* Set Load Mode Register Command */
- tmp = __REG(MODE_REG_VAL); /* Issue Load Mode Register Command */
+ __REG(MODE_REG_VAL); /* Issue Load Mode Register Command */
SF_Normal();
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 08/10] board/mx1ads/syncflash.c: Fix GCC 4.6 warnings
2011-11-19 23:12 ` [U-Boot] [PATCH 08/10] board/mx1ads/syncflash.c: " Anatolij Gustschin
@ 2011-11-23 7:23 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:23 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> syncflash.c: In function 'SF_SR':
> syncflash.c:60:10: warning: variable 'tmp1' set but not used
> [-Wunused-but-set-variable]
> syncflash.c: In function 'SF_PrechargeAll':
> syncflash.c:96:6: warning: variable 'tmp' set but not used
> [-Wunused-but-set-variable]
> mx1ads.c: In function 'board_early_init_f':
> mx1ads.c:83:24: warning: variable 'tmp' set but not used
> [-Wunused-but-set-variable]
> syncflash.c: In function 'SF_Erase':
> syncflash.c:112:6: warning: variable 'tmp' set but not used
> [-Wunused-but-set-variable]
> syncflash.c: In function 'flash_init':
> syncflash.c:155:6: warning: variable 'tmp' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> board/mx1ads/syncflash.c | 20 +++++++++-----------
> 1 files changed, 9 insertions(+), 11 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread
* [U-Boot] [PATCH 09/10] board/mx1ads/mx1ads.c: Fix GCC 4.6 warning
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
` (7 preceding siblings ...)
2011-11-19 23:12 ` [U-Boot] [PATCH 08/10] board/mx1ads/syncflash.c: " Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:23 ` Heiko Schocher
2011-11-19 23:12 ` [U-Boot] [PATCH 10/10] common/cmd_bootm.c: Fix GCC 4.6 warnings Anatolij Gustschin
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
mx1ads.c: In function 'board_early_init_f':
mx1ads.c:83:24: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
board/mx1ads/mx1ads.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/board/mx1ads/mx1ads.c b/board/mx1ads/mx1ads.c
index 86b49fb..da9e21d 100644
--- a/board/mx1ads/mx1ads.c
+++ b/board/mx1ads/mx1ads.c
@@ -27,6 +27,7 @@
#include <netdev.h>
/*#include <mc9328.h>*/
#include <asm/arch/imx-regs.h>
+#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -80,8 +81,6 @@ static u32 mc9328sid;
int board_early_init_f(void)
{
- volatile unsigned int tmp;
-
mc9328sid = SIDR;
GPCR = 0x000003AB; /* I/O pad driving strength */
@@ -107,8 +106,8 @@ int board_early_init_f(void)
GIUS (0) &= 0xFF3FFFFF;
GPR (0) &= 0xFF3FFFFF;
- tmp = *(unsigned int *) (0x1500000C);
- tmp = *(unsigned int *) (0x1500000C);
+ readl(0x1500000C);
+ readl(0x1500000C);
SetAsynchMode ();
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 09/10] board/mx1ads/mx1ads.c: Fix GCC 4.6 warning
2011-11-19 23:12 ` [U-Boot] [PATCH 09/10] board/mx1ads/mx1ads.c: Fix GCC 4.6 warning Anatolij Gustschin
@ 2011-11-23 7:23 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:23 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> mx1ads.c: In function 'board_early_init_f':
> mx1ads.c:83:24: warning: variable 'tmp' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> board/mx1ads/mx1ads.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread
* [U-Boot] [PATCH 10/10] common/cmd_bootm.c: Fix GCC 4.6 warnings
2011-11-19 23:12 [U-Boot] [PATCH 00/10] another round of GCC 4.6 warning fixes Anatolij Gustschin
` (8 preceding siblings ...)
2011-11-19 23:12 ` [U-Boot] [PATCH 09/10] board/mx1ads/mx1ads.c: Fix GCC 4.6 warning Anatolij Gustschin
@ 2011-11-19 23:12 ` Anatolij Gustschin
2011-11-23 7:23 ` Heiko Schocher
9 siblings, 1 reply; 21+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 23:12 UTC (permalink / raw)
To: u-boot
Fix:
cmd_bootm.c: In function 'bootm_load_os':
cmd_bootm.c:315:7: warning: unused variable 'unc_len'
[-Wunused-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
common/cmd_bootm.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index d301332..b073f09 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -36,6 +36,7 @@
#include <lmb.h>
#include <linux/ctype.h>
#include <asm/byteorder.h>
+#include <linux/compiler.h>
#if defined(CONFIG_CMD_USB)
#include <usb.h>
@@ -312,7 +313,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
ulong blob_end = os.end;
ulong image_start = os.image_start;
ulong image_len = os.image_len;
- uint unc_len = CONFIG_SYS_BOOTM_LEN;
+ __maybe_unused uint unc_len = CONFIG_SYS_BOOTM_LEN;
#if defined(CONFIG_LZMA) || defined(CONFIG_LZO)
int ret;
#endif /* defined(CONFIG_LZMA) || defined(CONFIG_LZO) */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [U-Boot] [PATCH 10/10] common/cmd_bootm.c: Fix GCC 4.6 warnings
2011-11-19 23:12 ` [U-Boot] [PATCH 10/10] common/cmd_bootm.c: Fix GCC 4.6 warnings Anatolij Gustschin
@ 2011-11-23 7:23 ` Heiko Schocher
0 siblings, 0 replies; 21+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:23 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> Fix:
> cmd_bootm.c: In function 'bootm_load_os':
> cmd_bootm.c:315:7: warning: unused variable 'unc_len'
> [-Wunused-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> common/cmd_bootm.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 21+ messages in thread