More fixes GCC 4.6 build warnings
Subsystems (3)
cover More fixes GCC 4.6 build warnings
Here is anothe rbatch of patches for GCC 4.6 build warnings on PPC boards.
Note that not all patches are actually checkpatch-clean. There are some boards which are more or less dead (for example, the Marvell DB64360 and DB64460 boards): they have not been actively maintained for a number of years, but making them build-clean was about the same effort as removing them, so I decided to kep them for now, but I did not invest efforts n a real cleanup.
Wolfgang Denk (14):
alpr board: Fix GCC 4.6 build warnings board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning drivers/block/sata_dwc.c: Fix GCC 4.6 build warning board/cray/L1/flash.c: Fix GCC 4.6 build warning
DB64360: Fix GCC 4.6 build warnings
DB64460: Fix GCC 4.6 build warnings board/sandburst/common/flash.c: Fix GCC 4.6 build warning drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning board/mpl/common/flash.c: Fix GCC 4.6 build warning board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warning arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning board/sbc405/strataflash.c: Fix GCC 4.6 build warning board/emk/top860/top860.c: Fix GCC 4.6 build warning
arch/powerpc/cpu/mpc86xx/cpu.c | 3 - board/Marvell/db64360/db64360.c | 3 +- board/Marvell/db64360/mv_eth.c | 33 +-- board/Marvell/db64360/sdram_init.c | 517 ++++++++++++++--------------- board/Marvell/db64460/db64460.c | 3 +- board/Marvell/db64460/mv_eth.c | 33 +-- board/Marvell/db64460/sdram_init.c | 515 ++++++++++++++--------------- board/amirix/ap1000/flash.c | 3 - board/cray/L1/flash.c | 25 +- board/emk/top860/top860.c | 7 +- board/freescale/mpc8610hpcd/mpc8610hpcd.c | 3 +- board/mpl/common/flash.c | 3 +- board/prodrive/alpr/fpga.c | 3 - board/prodrive/alpr/nand.c | 4 +- board/sandburst/common/flash.c | 5 +- board/sbc405/strataflash.c | 3 - drivers/block/sata_dwc.c | 6 +- drivers/usb/host/sl811-hcd.c | 12 +- post/board/lwmon5/gdc.c | 3 +- 19 files changed, 535 insertions(+), 649 deletions(-)
Signature · 1 line
1.7.6.4
PATCH 1/14 alpr board: Fix GCC 4.6 build warnings
Fix:fpga.c: In function 'fpga_pre_fn':
fpga.c:88:16: warning: variable 'reg' set but not used [-Wunused-but-set-variable]nand.c: In function 'alpr_nand_dev_ready':
nand.c:125:18: warning: variable 'val' set but not used [-Wunused-but-set-variable]
---
total: 0 errors, 0 warnings, 22 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/prodrive/alpr/fpga.c | 3 --- board/prodrive/alpr/nand.c | 4 +--- 2 files changed, 1 insertions(+), 6 deletions(-)
board/prodrive/alpr/fpga.c +0 -3
@@ -85,9 +85,6 @@ static unsigned long regval;/* PROGRAM_SEL_DPR = LOW */ int fpga_pre_fn (int cookie) { -unsigned long reg; - - reg =in32 (GPIO0_IR );/* Enable the FPGA Chain */ SET_GPIO_REG_1 (GPIO0_TCR ,CONFIG_SYS_GPIO_PROG_EN );SET_GPIO_REG_0 (GPIO0_ODR ,CONFIG_SYS_GPIO_PROG_EN );
board/prodrive/alpr/nand.c +1 -3
@@ -122,12 +122,10 @@ static int alpr_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int lenstatic int alpr_nand_dev_ready (struct mtd_info *mtd) { -volatile u_char val; -/* * Blocking read to wait for NAND to be ready */ - val =readb (&(alpr_ndfc->addr_wait)); + (void )readb (&(alpr_ndfc->addr_wait));/* * Return always true
Signature · 1 line
1.7.6.4
PATCH 1/14 alpr board: Fix GCC 4.6 build warnings
Quoted 10 lines · On Wednesday 30 November 2011 09:17:44 Wolfgang Denk wrote:
Fix:
fpga.c: In function 'fpga_pre_fn':
fpga.c:88:16: warning: variable 'reg' set but not used [-Wunused-but-set-variable]nand.c: In function 'alpr_nand_dev_ready':
nand.c:125:18: warning: variable 'val' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Stefan Roese <[email protected]>
Thanks.
Best regards,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
Wolfgang Denk
AppliedPATCH 1/14 alpr board: Fix GCC 4.6 build warnings
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 10 lines · In message <[email protected]> you wrote:
Fix:
fpga.c: In function 'fpga_pre_fn':
fpga.c:88:16: warning: variable 'reg' set but not used [-Wunused-but-set-variable]nand.c: In function 'alpr_nand_dev_ready':
nand.c:125:18: warning: variable 'val' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Stefan Roese <[email protected]>
Quoted 7 lines
---
total: 0 errors, 0 warnings, 22 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/prodrive/alpr/fpga.c | 3 --- board/prodrive/alpr/nand.c | 4 +--- 2 files changed, 1 insertions(+), 6 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You can observe a lot just by watchin'. - Yogi Berra
PATCH 2/14 board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:flash.c: In function 'flash_write_cfiword':
flash.c:778:11: warning: variable 'ctladdr' set but not used [-Wunused-but-set-variable]
---
total: 0 errors, 0 warnings, 12 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/amirix/ap1000/flash.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
board/amirix/ap1000/flash.c +0 -3
@@ -774,12 +774,9 @@ static ulong flash_get_size (ulong base, int banknum)static int flash_write_cfiword (flash_info_t * info,ulong dest,cfiword_t cword) { - -cfiptr_t ctladdr;cfiptr_t cptr;int flag; - ctladdr.cp =flash_make_addr (info,0 ,0 ); cptr.cp = (uchar *) dest;/* Check if Flash is (sufficiently) erased */
Signature · 1 line
1.7.6.4
PATCH 2/14 board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning
Quoted 21 lines
Fix:
flash.c: In function 'flash_write_cfiword':
flash.c:778:11: warning: variable 'ctladdr' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>---
total: 0 errors, 0 warnings, 12 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/amirix/ap1000/flash.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)board/amirix/ap1000/flash.c +0
-0@@ -774,12 +774,9 @@ static ulong flash_get_size (ulong base, int banknum)static int flash_write_cfiword (flash_info_t * info,ulong dest,cfiword_t cword)
board/amirix/ap1000/flash.c static ulong flash_get_size (ulong base, int banknum) · line 782
Quoted 10 lines
board/amirix/ap1000/flash.c +0
-3{ - -cfiptr_t ctladdr;cfiptr_t cptr;int flag; - ctladdr.cp =flash_make_addr (info,0 ,0 ); cptr.cp = (uchar *) dest;/* Check if Flash is (sufficiently) erased */
Logically looks OK
Wolfgang Denk
AppliedPATCH 2/14 board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 5 lines · In message <[email protected]> you wrote:
Fix:
flash.c: In function 'flash_write_cfiword':
flash.c:778:11: warning: variable 'ctladdr' set but not used [-Wunused-but-set-variable]
Quoted 7 lines
Signed-off-by Wolfgang Denk <[email protected]>---
total: 0 errors, 0 warnings, 12 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/amirix/ap1000/flash.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The only person who always got his work done by Friday
was Robinson Crusoe.PATCH 3/14 drivers/block/sata_dwc.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:sata_dwc.c: In function 'scan_sata':
sata_dwc.c:535:38: warning: variable 'udma_mask' set but not used [-Wunused-but-set-variable]
---
total: 0 errors, 0 warnings, 18 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
drivers/block/sata_dwc.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/block/sata_dwc.c +1 -5
@@ -532,7 +532,7 @@ int scan_sata(int dev)u8 status;const u16 *id;struct ata_device *ata_dev = &ata_device; -unsigned long pio_mask, mwdma_mask, udma_mask; +unsigned long pio_mask, mwdma_mask;char revbuf[7 ];u16 iobuf[ATA_SECTOR_WORDS ];
@@ -622,10 +622,6 @@ int scan_sata(int dev) mwdma_mask |= (1 <<4 ); } - udma_mask =0 ; -if (id[ATA_ID_FIELD_VALID ] & (1 <<2 )) - udma_mask = id[ATA_ID_UDMA_MODES ] &0xff ; -if (ata_dev->class ==ATA_DEV_ATA ) {if (ata_id_is_cfa (id)) {if (id[162 ] &1 )
Signature · 1 line
1.7.6.4
Wolfgang Denk
AppliedPATCH 3/14 drivers/block/sata_dwc.c: Fix GCC 4.6 build warning
Dear Wolfgang Denk,
Quoted 5 lines · In message <[email protected]> you wrote:
Fix:
sata_dwc.c: In function 'scan_sata':
sata_dwc.c:535:38: warning: variable 'udma_mask' set but not used [-Wunused-but-set-variable]
Quoted 8 lines
Signed-off-by Wolfgang Denk <[email protected]>Cc Kazuaki Ichinohe <[email protected]>---
total: 0 errors, 0 warnings, 18 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEdrivers/block/sata_dwc.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I've finally learned what `upward compatible' means. It means we get to keep all our old mistakes." - Dennie van Tassel
PATCH 4/14 board/cray/L1/flash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:flash.c: In function 'flash_erase':
flash.c:276:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable]
---
total: 0 errors, 0 warnings, 49 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/cray/L1/flash.c | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-)
board/cray/L1/flash.c +11 -14
@@ -273,7 +273,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) {volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info->start[0 ]);volatile FLASH_WORD_SIZE *addr2; -int flag, prot, sect, l_sect; +int flag, prot, sect;if ((s_first <0 ) || (s_first > s_last)) {if (info->flash_id ==FLASH_UNKNOWN ) {
@@ -303,16 +303,14 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)printf ("\n" ); } - l_sect =-1 ; -/* Disable interrupts which might cause a timeout here */ flag =disable_interrupts ();/* Start erase on unprotected sectors */ for (sect = s_first; sect<=s_last; sect++) {if (info->protect[sect] ==0 ) {/* not protected */ - addr2 = (FLASH_WORD_SIZE *)(info->start[sect]); -printf ("Erasing sector %p\n" , addr2); + addr2 = (FLASH_WORD_SIZE *)(info->start[sect]); +printf ("Erasing sector %p\n" , addr2); addr[ADDR0 ] = (FLASH_WORD_SIZE )0x00AA00AA ; addr[ADDR1 ] = (FLASH_WORD_SIZE )0x00550055 ;
@@ -320,15 +318,14 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) addr[ADDR0 ] = (FLASH_WORD_SIZE )0x00AA00AA ; addr[ADDR1 ] = (FLASH_WORD_SIZE )0x00550055 ; addr2[0 ] = (FLASH_WORD_SIZE )0x00300030 ;/* sector erase */ - l_sect = sect; -/* -* Wait for each sector to complete, it's more -* reliable. According to AMD Spec, you must -* issue all erase commands within a specified -* timeout. This has been seen to fail, especially -* if printf()s are included (for debug)!! -*/ -wait_for_DQ7 (info, sect); +/* +* Wait for each sector to complete, it's more +* reliable. According to AMD Spec, you must +* issue all erase commands within a specified +* timeout. This has been seen to fail, especially +* if printf()s are included (for debug)!! +*/ +wait_for_DQ7 (info, sect); } }
Signature · 1 line
1.7.6.4
PATCH 4/14 board/cray/L1/flash.c: Fix GCC 4.6 build warning
board/cray/L1/flash.c int flash_erase (flash_info_t *info, int s_first,
Quoted 19 lines
Fix:
flash.c: In function 'flash_erase':
flash.c:276:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>---
total: 0 errors, 0 warnings, 49 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/cray/L1/flash.c | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-)board/cray/L1/flash.c +0
-0@@ -273,7 +273,7 @@ int flash_erase (flash_info_t *info, int s_first,
int
board/cray/L1/flash.c int flash_erase (flash_info_t *info, int s_first,
Quoted 9 lines
board/cray/L1/flash.c +1
-1s_last) {volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info->start[0 ]);volatile FLASH_WORD_SIZE *addr2; -int flag, prot, sect, l_sect; +int flag, prot, sect;if ((s_first <0 ) || (s_first > s_last)) {if (info->flash_id ==FLASH_UNKNOWN ) {@@ -303,16 +303,14 @@ int flash_erase (flash_info_t *info, int s_first,
int
board/cray/L1/flash.c int flash_erase (flash_info_t *info, int s_first,
Quoted 19 lines
board/cray/L1/flash.c +2
-4s_last) printf ("\n"); } - l_sect =-1 ; -/* Disable interrupts which might cause a timeout here */ flag =disable_interrupts ();/* Start erase on unprotected sectors */ for (sect = s_first; sect<=s_last; sect++) {if (info->protect[sect] ==0 ) {/* not protected */ - addr2 = (FLASH_WORD_SIZE *)(info->start[sect]); -printf ("Erasing sector %p\n" , addr2); + addr2 = (FLASH_WORD_SIZE *)(info->start[sect]); +printf ("Erasing sector %p\n" , addr2); addr[ADDR0 ] = (FLASH_WORD_SIZE )0x00AA00AA ; addr[ADDR1 ] = (FLASH_WORD_SIZE )0x00550055 ;@@ -320,15 +318,14 @@ int flash_erase (flash_info_t *info, int s_first,
int
board/cray/L1/flash.c int flash_erase (flash_info_t *info, int s_first, · line 320
Quoted 3 lines
board/cray/L1/flash.c +0
-0s_last) addr[ADDR0] = (FLASH_WORD_SIZE)0x00AA00AA; addr[ADDR1 ] = (FLASH_WORD_SIZE )0x00550055 ; addr2[0 ] = (FLASH_WORD_SIZE )0x00300030 ;/* sector erase
*/
Quoted 9 lines
board/cray/L1/flash.c +0
-9- l_sect = sect; -/* -* Wait for each sector to complete, it's more -* reliable. According to AMD Spec, you must -* issue all erase commands within a specified -* timeout. This has been seen to fail, especially -* if printf()s are included (for debug)!! -*/ -wait_for_DQ7 (info, sect);
board/cray/L1/flash.c int flash_erase (flash_info_t *info, int s_first, int s_last) · line 330
Quoted 10 lines
board/cray/L1/flash.c +8
-0+/* +* Wait for each sector to complete, it's more +* reliable. According to AMD Spec, you must +* issue all erase commands within a specified +* timeout. This has been seen to fail, especially +* if printf()s are included (for debug)!! +*/ +wait_for_DQ7 (info, sect); } }
Logically looks OK
Wolfgang Denk
AppliedPATCH 4/14 board/cray/L1/flash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 5 lines · In message <[email protected]> you wrote:
Fix:
flash.c: In function 'flash_erase':
flash.c:276:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable]
Quoted 7 lines
Signed-off-by Wolfgang Denk <[email protected]>---
total: 0 errors, 0 warnings, 49 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/cray/L1/flash.c | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I dislike companies that have a we-are-the-high-priests-of-hardware- so-you'll-like-what-we-give-you attitude. I like commodity markets in which iron-and-silicon hawkers know that they exist to provide fast toys for software types like me to play with..." - Eric S. Raymond
PATCH 5/14 DB64360: Fix GCC 4.6 build warnings
In reply to Wolfgang DenkFix:db64360.c: In function 'debug_led':
db64360.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_real_open':
mv_eth.c:424:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_stop':
mv_eth.c:642:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_xmit':
mv_eth.c:718:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_receive':
mv_eth.c:803:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_get_stats':
mv_eth.c:902:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_update_stat':
mv_eth.c:930:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c:929:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64360_eth_print_stat':
mv_eth.c:1011:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'eth_clear_mib_counters':
mv_eth.c:2068:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'check_dimm':
sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'setup_sdram':
sdram_init.c:1256:13: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'initdram':
sdram_init.c:1735:25: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c:1733:14: warning: variable 's1' set but not used [-Wunused-but-set-variable] sdram_init.c:1733:6: warning: variable 's0' set but not used [-Wunused-but-set-variable]
Note: no attempt was make to clean up the mess coding style and other issues in sdram_init.c
---
WARNING: space prohibited between function name and open parenthesis '('
WARNING: line over 80 characters
WARNING: unnecessary whitespace before a quoted newline
...
total: 0 errors, 101 warnings, 1327 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Warnings ignored, no further cleanup attempted.
board/Marvell/db64360/db64360.c | 3 +- board/Marvell/db64360/mv_eth.c | 33 +-- board/Marvell/db64360/sdram_init.c | 517 +++++++++++++++++------------------- 3 files changed, 254 insertions(+), 299 deletions(-)
board/Marvell/db64360/db64360.c +2 -1
@@ -34,6 +34,7 @@#include "../include/mv_gen_reg.h" #include <net.h> #include <netdev.h> +#include <linux/compiler.h> #include "eth.h" #include "mpsc.h"
@@ -410,7 +411,7 @@ int checkboard (void)void debug_led (int led,int mode) {volatile int *addr =0 ; -int dummy; +__maybe_unused int dummy;if (mode ==1 ) {switch (led) {
board/Marvell/db64360/mv_eth.c +5 -28
@@ -421,7 +421,7 @@ static int mv64360_eth_real_open (struct eth_device *dev)ETH_PORT_INFO *ethernet_private;struct mv64360_eth_priv *port_private;unsigned int port_num; -u32 port_status, phy_reg_data; +u32 phy_reg_data; ethernet_private = (ETH_PORT_INFO *) dev->priv;/* ronen - when we update the MAC env params we only update dev->enetaddr
@@ -519,7 +519,7 @@ static int mv64360_eth_real_open (struct eth_device *dev)*/ MV_REG_WRITE (MV64360_ETH_MAXIMUM_TRANSMIT_UNIT (port_num),0 ); - port_status =MV_REG_READ (MV64360_ETH_PORT_STATUS_REG (port_num)); +MV_REG_READ (MV64360_ETH_PORT_STATUS_REG (port_num));/* Check Link status on phy */ eth_port_read_smi_reg (port_num,1 , &phy_reg_data);
@@ -637,15 +637,6 @@ static int mv64360_eth_free_rx_rings (struct eth_device *dev)int mv64360_eth_stop (struct eth_device *dev) { -ETH_PORT_INFO *ethernet_private; -struct mv64360_eth_priv *port_private; -unsigned int port_num; - - ethernet_private = (ETH_PORT_INFO *) dev->priv; - port_private = - (struct mv64360_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; -/* Disable all gigE address decoder */ MV_REG_WRITE (MV64360_ETH_BASE_ADDR_ENABLE_REG ,0x3f );DP (printf ("%s Ethernet stop called ... \n" , __FUNCTION__));
@@ -715,7 +706,6 @@ int mv64360_eth_xmit (struct eth_device *dev, volatile void *dataPtr, {ETH_PORT_INFO *ethernet_private;struct mv64360_eth_priv *port_private; -unsigned int port_num;PKT_INFO pkt_info;ETH_FUNC_RET_STATUS status;struct net_device_stats *stats;
@@ -724,7 +714,6 @@ int mv64360_eth_xmit (struct eth_device *dev, volatile void *dataPtr, ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64360_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; stats = port_private->stats;
@@ -800,15 +789,12 @@ int mv64360_eth_receive (struct eth_device *dev) {ETH_PORT_INFO *ethernet_private;struct mv64360_eth_priv *port_private; -unsigned int port_num;PKT_INFO pkt_info;struct net_device_stats *stats; - ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64360_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; stats = port_private->stats; while ((eth_port_receive (ethernet_private, ETH_Q0, &pkt_info) ==
@@ -899,12 +885,10 @@ static struct net_device_stats *mv64360_eth_get_stats (struct eth_device *dev) {ETH_PORT_INFO *ethernet_private;struct mv64360_eth_priv *port_private; -unsigned int port_num; ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64360_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num;mv64360_eth_update_stat (dev);
@@ -926,13 +910,10 @@ static void mv64360_eth_update_stat (struct eth_device *dev)ETH_PORT_INFO *ethernet_private;struct mv64360_eth_priv *port_private;struct net_device_stats *stats; -unsigned int port_num; -volatile unsigned int dummy; ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64360_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; stats = port_private->stats;/* These are false updates */
@@ -955,12 +936,12 @@ static void mv64360_eth_update_stat (struct eth_device *dev)* But the unsigned long in PowerPC and MIPS are 32bit. So the next read * is just a dummy read for proper work of the GigE port */ - dummy =eth_read_mib_counter (ethernet_private->port_num, +eth_read_mib_counter (ethernet_private->port_num,ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH ); stats->tx_bytes += (unsigned long )eth_read_mib_counter (ethernet_private->port_num,ETH_MIB_GOOD_OCTETS_SENT_LOW ); - dummy =eth_read_mib_counter (ethernet_private->port_num, +eth_read_mib_counter (ethernet_private->port_num,ETH_MIB_GOOD_OCTETS_SENT_HIGH ); stats->rx_errors += (unsigned long ) eth_read_mib_counter (ethernet_private->port_num,
@@ -1008,12 +989,10 @@ static void mv64360_eth_print_stat (struct eth_device *dev)ETH_PORT_INFO *ethernet_private;struct mv64360_eth_priv *port_private;struct net_device_stats *stats; -unsigned int port_num; ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64360_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; stats = port_private->stats;/* These are false updates */
@@ -2065,13 +2044,11 @@ static void eth_port_init_mac_tables (ETH_PORT eth_port_num)static void eth_clear_mib_counters (ETH_PORT eth_port_num) {int i; -unsigned int dummy;/* Perform dummy reads from MIB counters */ for (i =ETH_MIB_GOOD_OCTETS_RECEIVED_LOW ; i <ETH_MIB_LATE_COLLISION ; i +=4 ) - dummy =MV_REG_READ ((MV64360_ETH_MIB_COUNTERS_BASE - (eth_port_num) + i)); +MV_REG_READ ((MV64360_ETH_MIB_COUNTERS_BASE (eth_port_num) + i));return ; }
board/Marvell/db64360/sdram_init.c +247 -270
1,187 lines not on this page · raw message
Signature · 1 line
1.7.6.4
Wolfgang Denk
AppliedPATCH 5/14 DB64360: Fix GCC 4.6 build warnings
Dear Wolfgang Denk,
Quoted 44 lines · In message <[email protected]> you wrote:
Fix:
db64360.c: In function 'debug_led':
db64360.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64360_eth_real_open':
mv_eth.c:424:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64360_eth_stop':
mv_eth.c:642:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64360_eth_xmit':
mv_eth.c:718:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64360_eth_receive':
mv_eth.c:803:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64360_eth_get_stats':
mv_eth.c:902:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64360_eth_update_stat':
mv_eth.c:930:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c:929:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64360_eth_print_stat':
mv_eth.c:1011:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'eth_clear_mib_counters':
mv_eth.c:2068:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]sdram_init.c: In function 'check_dimm':
sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable]sdram_init.c: In function 'setup_sdram':
sdram_init.c:1256:13: warning: variable 'check' set but not used [-Wunused-but-set-variable]sdram_init.c: In function 'initdram':
sdram_init.c:1735:25: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c:1733:14: warning: variable 's1' set but not used [-Wunused-but-set-variable] sdram_init.c:1733:6: warning: variable 's0' set but not used [-Wunused-but-set-variable]Note: no attempt was make to clean up the mess coding style and other issues in
sdram_init.cSigned-off-by Wolfgang Denk <[email protected]>---
WARNING: space prohibited between function name and open parenthesis '('
WARNING: line over 80 characters
WARNING: unnecessary whitespace before a quoted newline
...
total: 0 errors, 101 warnings, 1327 lines checked
Quoted 8 lines
NOTE: Ignored message types:
COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEWarnings ignored, no further cleanup attempted.
board/Marvell/db64360/db64360.c | 3 +- board/Marvell/db64360/mv_eth.c | 33 +-- board/Marvell/db64360/sdram_init.c | 517 +++++++++++++++++------------------- 3 files changed, 254 insertions(+), 299 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In general, if you think something isn't in Perl, try it out, because it usually is :-) - Larry Wall in <[email protected]>
PATCH 6/14 DB64460: Fix GCC 4.6 build warnings
In reply to Wolfgang DenkFix:db64460.c: In function 'debug_led':
db64460.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_real_open':
mv_eth.c:423:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_stop':
mv_eth.c:641:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_xmit':
mv_eth.c:717:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_receive':
mv_eth.c:802:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_get_stats':
mv_eth.c:901:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_update_stat':
mv_eth.c:929:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c:928:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'mv64460_eth_print_stat':
mv_eth.c:1010:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable] mv_eth.c: In function 'eth_clear_mib_counters':
mv_eth.c:2067:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'check_dimm':
sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'setup_sdram':
sdram_init.c:1255:13: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c: In function 'initdram':
sdram_init.c:1744:25: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c:1742:14: warning: variable 's1' set but not used [-Wunused-but-set-variable] sdram_init.c:1742:6: warning: variable 's0' set but not used [-Wunused-but-set-variable]
Note: no attempt was make to clean up the mess coding style and other issues in sdram_init.c
---
WARNING: space prohibited between function name and open parenthesis '('
WARNING: unnecessary whitespace before a quoted newline
WARNING: line over 80 characters
...
total: 0 errors, 117 warnings, 1335 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Warnings ignored, no further cleanup attempted.
board/Marvell/db64460/db64460.c | 3 +- board/Marvell/db64460/mv_eth.c | 33 +-- board/Marvell/db64460/sdram_init.c | 515 +++++++++++++++++------------------- 3 files changed, 255 insertions(+), 296 deletions(-)
board/Marvell/db64460/db64460.c +2 -1
@@ -34,6 +34,7 @@#include "../include/mv_gen_reg.h" #include <net.h> #include <netdev.h> +#include <linux/compiler.h> #include "eth.h" #include "mpsc.h"
@@ -410,7 +411,7 @@ int checkboard (void)void debug_led (int led,int mode) {volatile int *addr =0 ; -int dummy; +__maybe_unused int dummy;if (mode ==1 ) {switch (led) {
board/Marvell/db64460/mv_eth.c +5 -28
@@ -420,7 +420,7 @@ static int mv64460_eth_real_open (struct eth_device *dev)ETH_PORT_INFO *ethernet_private;struct mv64460_eth_priv *port_private;unsigned int port_num; -u32 port_status, phy_reg_data; +u32 phy_reg_data; ethernet_private = (ETH_PORT_INFO *) dev->priv;/* ronen - when we update the MAC env params we only update dev->enetaddr
@@ -518,7 +518,7 @@ static int mv64460_eth_real_open (struct eth_device *dev)*/ MV_REG_WRITE (MV64460_ETH_MAXIMUM_TRANSMIT_UNIT (port_num),0 ); - port_status =MV_REG_READ (MV64460_ETH_PORT_STATUS_REG (port_num)); +MV_REG_READ (MV64460_ETH_PORT_STATUS_REG (port_num));/* Check Link status on phy */ eth_port_read_smi_reg (port_num,1 , &phy_reg_data);
@@ -636,15 +636,6 @@ static int mv64460_eth_free_rx_rings (struct eth_device *dev)int mv64460_eth_stop (struct eth_device *dev) { -ETH_PORT_INFO *ethernet_private; -struct mv64460_eth_priv *port_private; -unsigned int port_num; - - ethernet_private = (ETH_PORT_INFO *) dev->priv; - port_private = - (struct mv64460_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; -/* Disable all gigE address decoder */ MV_REG_WRITE (MV64460_ETH_BASE_ADDR_ENABLE_REG ,0x3f );DP (printf ("%s Ethernet stop called ... \n" , __FUNCTION__));
@@ -714,7 +705,6 @@ int mv64460_eth_xmit (struct eth_device *dev, volatile void *dataPtr, {ETH_PORT_INFO *ethernet_private;struct mv64460_eth_priv *port_private; -unsigned int port_num;PKT_INFO pkt_info;ETH_FUNC_RET_STATUS status;struct net_device_stats *stats;
@@ -723,7 +713,6 @@ int mv64460_eth_xmit (struct eth_device *dev, volatile void *dataPtr, ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64460_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; stats = port_private->stats;
@@ -799,15 +788,12 @@ int mv64460_eth_receive (struct eth_device *dev) {ETH_PORT_INFO *ethernet_private;struct mv64460_eth_priv *port_private; -unsigned int port_num;PKT_INFO pkt_info;struct net_device_stats *stats; - ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64460_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; stats = port_private->stats; while ((eth_port_receive (ethernet_private, ETH_Q0, &pkt_info) ==
@@ -898,12 +884,10 @@ static struct net_device_stats *mv64460_eth_get_stats (struct eth_device *dev) {ETH_PORT_INFO *ethernet_private;struct mv64460_eth_priv *port_private; -unsigned int port_num; ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64460_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num;mv64460_eth_update_stat (dev);
@@ -925,13 +909,10 @@ static void mv64460_eth_update_stat (struct eth_device *dev)ETH_PORT_INFO *ethernet_private;struct mv64460_eth_priv *port_private;struct net_device_stats *stats; -unsigned int port_num; -volatile unsigned int dummy; ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64460_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; stats = port_private->stats;/* These are false updates */
@@ -954,12 +935,12 @@ static void mv64460_eth_update_stat (struct eth_device *dev)* But the unsigned long in PowerPC and MIPS are 32bit. So the next read * is just a dummy read for proper work of the GigE port */ - dummy =eth_read_mib_counter (ethernet_private->port_num, +eth_read_mib_counter (ethernet_private->port_num,ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH ); stats->tx_bytes += (unsigned long )eth_read_mib_counter (ethernet_private->port_num,ETH_MIB_GOOD_OCTETS_SENT_LOW ); - dummy =eth_read_mib_counter (ethernet_private->port_num, +eth_read_mib_counter (ethernet_private->port_num,ETH_MIB_GOOD_OCTETS_SENT_HIGH ); stats->rx_errors += (unsigned long ) eth_read_mib_counter (ethernet_private->port_num,
@@ -1007,12 +988,10 @@ static void mv64460_eth_print_stat (struct eth_device *dev)ETH_PORT_INFO *ethernet_private;struct mv64460_eth_priv *port_private;struct net_device_stats *stats; -unsigned int port_num; ethernet_private = (ETH_PORT_INFO *) dev->priv; port_private = (struct mv64460_eth_priv *) ethernet_private->port_private; - port_num = port_private->port_num; stats = port_private->stats;/* These are false updates */
@@ -2064,13 +2043,11 @@ static void eth_port_init_mac_tables (ETH_PORT eth_port_num)static void eth_clear_mib_counters (ETH_PORT eth_port_num) {int i; -unsigned int dummy;/* Perform dummy reads from MIB counters */ for (i =ETH_MIB_GOOD_OCTETS_RECEIVED_LOW ; i <ETH_MIB_LATE_COLLISION ; i +=4 ) - dummy =MV_REG_READ ((MV64460_ETH_MIB_COUNTERS_BASE - (eth_port_num) + i)); +MV_REG_READ ((MV64460_ETH_MIB_COUNTERS_BASE (eth_port_num) + i));return ; }
board/Marvell/db64460/sdram_init.c +248 -267
1,195 lines not on this page · raw message
Signature · 1 line
1.7.6.4
Wolfgang Denk
AppliedPATCH 6/14 DB64460: Fix GCC 4.6 build warnings
Dear Wolfgang Denk,
Quoted 44 lines · In message <[email protected]> you wrote:
Fix:
db64460.c: In function 'debug_led':
db64460.c:413:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64460_eth_real_open':
mv_eth.c:423:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64460_eth_stop':
mv_eth.c:641:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64460_eth_xmit':
mv_eth.c:717:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64460_eth_receive':
mv_eth.c:802:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64460_eth_get_stats':
mv_eth.c:901:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64460_eth_update_stat':
mv_eth.c:929:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] mv_eth.c:928:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'mv64460_eth_print_stat':
mv_eth.c:1010:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]mv_eth.c: In function 'eth_clear_mib_counters':
mv_eth.c:2067:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]sdram_init.c: In function 'check_dimm':
sdram_init.c:289:50: warning: variable 'trrd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:37: warning: variable 'tras_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:24: warning: variable 'trcd_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:289:8: warning: variable 'trp_clocks' set but not used [-Wunused-but-set-variable] sdram_init.c:279:34: warning: variable 'devicesForErrCheck' set but not used [-Wunused-but-set-variable]sdram_init.c: In function 'setup_sdram':
sdram_init.c:1255:13: warning: variable 'check' set but not used [-Wunused-but-set-variable]sdram_init.c: In function 'initdram':
sdram_init.c:1744:25: warning: variable 'check' set but not used [-Wunused-but-set-variable] sdram_init.c:1742:14: warning: variable 's1' set but not used [-Wunused-but-set-variable] sdram_init.c:1742:6: warning: variable 's0' set but not used [-Wunused-but-set-variable]Note: no attempt was make to clean up the mess coding style and other issues in
sdram_init.cSigned-off-by Wolfgang Denk <[email protected]>---
WARNING: space prohibited between function name and open parenthesis '('
WARNING: unnecessary whitespace before a quoted newline
WARNING: line over 80 characters
...
total: 0 errors, 117 warnings, 1335 lines checked
Quoted 8 lines
NOTE: Ignored message types:
COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEWarnings ignored, no further cleanup attempted.
board/Marvell/db64460/db64460.c | 3 +- board/Marvell/db64460/mv_eth.c | 33 +-- board/Marvell/db64460/sdram_init.c | 515 +++++++++++++++++------------------- 3 files changed, 255 insertions(+), 296 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de As of 1992, they're called European Economic Community fries.
PATCH 7/14 board/sandburst/common/flash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:../common/flash.c: In function 'flash_erase':../common/flash.c:307:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable]
---
total: 0 errors, 0 warnings, 23 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/sandburst/common/flash.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)
board/sandburst/common/flash.c +1 -4
@@ -304,7 +304,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) {volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info->start[0 ]);volatile FLASH_WORD_SIZE *addr2; -int flag, prot, sect, l_sect; +int flag, prot, sect;int i;if ((s_first <0 ) || (s_first > s_last)) {
@@ -335,8 +335,6 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)printf ("\n" ); } - l_sect =-1 ; -/* Disable interrupts which might cause a timeout here */ flag =disable_interrupts ();
@@ -363,7 +361,6 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) addr[ADDR1 ] = (FLASH_WORD_SIZE )0x00550055 ; addr2[0 ] = (FLASH_WORD_SIZE )0x00300030 ;/* sector erase */ } - l_sect = sect;/* * Wait for each sector to complete, it's more * reliable. According to AMD Spec, you must
Signature · 1 line
1.7.6.4
PATCH 7/14 board/sandburst/common/flash.c: Fix GCC 4.6 build warning
Quoted 38 lines
Fix:
../common/flash.c: In function 'flash_erase':../common/flash.c:307:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Travis Sawyer <[email protected]>---
total: 0 errors, 0 warnings, 23 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/sandburst/common/flash.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/board/sandburst/common/flash.cindex c65cb96..818a7c3 100644board/sandburst/common/flash.c +1
-3@@ -304,7 +304,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) {volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info->start[0 ]);volatile FLASH_WORD_SIZE *addr2; -int flag, prot, sect, l_sect; +int flag, prot, sect;int i;if ((s_first <0 ) || (s_first > s_last)) {@@ -335,8 +335,6 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) printf ("\n"); } - l_sect =-1 ; -/* Disable interrupts which might cause a timeout here */ flag =disable_interrupts ();
board/sandburst/common/flash.c int flash_erase (flash_info_t *info, int s_first, int · line 362
Quoted 2 lines
board/sandburst/common/flash.c +0
-0@@ -363,7 +361,6 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) addr[ADDR1] = (FLASH_WORD_SIZE)0x00550055; addr2[0 ] = (FLASH_WORD_SIZE )0x00300030 ;/*
sector erase */
board/sandburst/common/flash.c int flash_erase (flash_info_t *info, int s_first, int s_last) · line 366
Quoted 5 lines
board/sandburst/common/flash.c +0
-1} - l_sect = sect;/* * Wait for each sector to complete, it's more * reliable. According to AMD Spec, you must
Logically looks OK
Wolfgang Denk
AppliedPATCH 7/14 board/sandburst/common/flash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 5 lines · In message <[email protected]> you wrote:
Fix:
../common/flash.c: In function 'flash_erase':../common/flash.c:307:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable]
Quoted 8 lines
Signed-off-by Wolfgang Denk <[email protected]>Cc Travis Sawyer <[email protected]>---
total: 0 errors, 0 warnings, 23 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/sandburst/common/flash.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "In the long run, every program becomes rococo, and then rubble." - Alan Perlis
PATCH 8/14 drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:sl811-hcd.c: In function 'sl811_rh_submit_urb':
sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used [-Wunused-but-set-variable]
---
WARNING: space prohibited between function name and open parenthesis '(' #31: FILE: drivers/usb/host/sl811-hcd.c:554:
+ __u16 wValue = le16_to_cpu (cmd->value);
WARNING: space prohibited between function name and open parenthesis '(' #32: FILE: drivers/usb/host/sl811-hcd.c:555:
+ __u16 wLength = le16_to_cpu (cmd->length);
WARNING: space prohibited between function name and open parenthesis '(' #34: FILE: drivers/usb/host/sl811-hcd.c:557:
+ __u16 wIndex = le16_to_cpu (cmd->index);
total: 0 errors, 3 warnings, 25 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Warnings ignored. No further cleanup attempted.
drivers/usb/host/sl811-hcd.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-)
drivers/usb/host/sl811-hcd.c +5 -7
@@ -550,11 +550,12 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,__u8 *bufp = data_buf;int len =0 ;int status =0 ; -__u16 bmRType_bReq; -__u16 wValue; -__u16 wIndex; -__u16 wLength; +__u16 wValue =le16_to_cpu (cmd->value); +__u16 wLength =le16_to_cpu (cmd->length); +#ifdef SL811_DEBUG +__u16 wIndex =le16_to_cpu (cmd->index); +#endif if (usb_pipeint (pipe)) {PDEBUG (0 ,"interrupt transfer unimplemented!\n" );
@@ -562,9 +563,6 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe, } bmRType_bReq = cmd->requesttype | (cmd->request <<8 ); - wValue =le16_to_cpu (cmd->value); - wIndex =le16_to_cpu (cmd->index); - wLength =le16_to_cpu (cmd->length);PDEBUG (5 ,"submit rh urb, req = %d(%x) val = %#x index = %#x len=%d\n" , bmRType_bReq, bmRType_bReq, wValue, wIndex, wLength);
Signature · 1 line
1.7.6.4
PATCH 8/14 drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
Quoted 8 lines
Fix:
sl811-hcd.c: In function 'sl811_rh_submit_urb':
sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Remy Bohmer <[email protected]>---
I don't really understand this one (I didn't look too hard either). But I'd be careful about this.
Also, isn't the Cc missing ? I see only To and Cc to the list in the mail header.
M
PATCH 8/14 drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
Dear Marek Vasut,
Quoted 11 lines · In message <[email protected]> you wrote:
Quoted 8 lines
Fix:
sl811-hcd.c: In function 'sl811_rh_submit_urb':
sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Remy Bohmer <[email protected]>---
I don't really understand this one (I didn't look too hard either). But I'd be careful about this.
Have a second look, please.
Quoted 2 lines
Also, isn't the Cc missing ? I see only To and Cc to the list in the mail header.
Which Cc: is missing?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In general, if you think something isn't in Perl, try it out, because it usually is :-) - Larry Wall in <[email protected]>
Wolfgang Denk
AppliedPATCH 8/14 drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 20 lines · In message <[email protected]> you wrote:
Fix:
sl811-hcd.c: In function 'sl811_rh_submit_urb':
sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Remy Bohmer <[email protected]>---
WARNING: space prohibited between function name and open parenthesis '(' #31: FILE:drivers/usb/host/sl811-hcd.c:554:drivers/usb/host/sl811-hcd.c +1
-0+__u16 wValue =le16_to_cpu (cmd->value);WARNING: space prohibited between function name and open parenthesis '(' #32: FILE:
drivers/usb/host/sl811-hcd.c:555:drivers/usb/host/sl811-hcd.c +1
-0+__u16 wLength =le16_to_cpu (cmd->length);WARNING: space prohibited between function name and open parenthesis '(' #34: FILE:
drivers/usb/host/sl811-hcd.c:557:drivers/usb/host/sl811-hcd.c +1
-0+__u16 wIndex =le16_to_cpu (cmd->index);
Quoted 8 lines
total: 0 errors, 3 warnings, 25 lines checked
NOTE: Ignored message types:
COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEWarnings ignored. No further cleanup attempted.
drivers/usb/host/sl811-hcd.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de While most peoples' opinions change, the conviction of their correct- ness never does.
PATCH 9/14 post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:gdc.c: In function 'gdc_test_reg_one':
gdc.c:66:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
---
total: 0 errors, 0 warnings, 14 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
post/board/lwmon5/gdc.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
post/board/lwmon5/gdc.c +1 -2
@@ -63,13 +63,12 @@ const static unsigned long otherpattern = 0x01234567;/* test write/read og a given LIME Register */ static int gdc_test_reg_one (uint value) { -int ret;uint read_value;/* write test pattern */ out_be32 ((void *)GDC_SCRATCH_REG , value);/* read other location (protect against data lines capacity) */ - ret =in_be32 ((void *)GDC_RAM_START ); +in_be32 ((void *)GDC_RAM_START );/* verify test pattern */ read_value =in_be32 ((void *)GDC_SCRATCH_REG );if (read_value != value) {
Signature · 1 line
1.7.6.4
PATCH 9/14 post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning
Quoted 7 lines · On Wednesday 30 November 2011 09:17:52 Wolfgang Denk wrote:
Fix:
gdc.c: In function 'gdc_test_reg_one':
gdc.c:66:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Stefan Roese <[email protected]>
Thanks.
Best regards,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
Wolfgang Denk
AppliedPATCH 9/14 post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 5 lines · In message <[email protected]> you wrote:
Fix:
gdc.c: In function 'gdc_test_reg_one':
gdc.c:66:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
Quoted 8 lines
Signed-off-by Wolfgang Denk <[email protected]>Cc Stefan Roese <[email protected]>---
total: 0 errors, 0 warnings, 14 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEpost/board/lwmon5/gdc.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Blast medicine anyway! We've learned to tie into every organ in the human body but one. The brain! The brain is what life is all about. -- McCoy, "The Menagerie", stardate 3012.4
PATCH 10/14 board/mpl/common/flash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:../common/flash.c: In function 'flash_init':../common/flash.c:160:16: warning: variable 'size_b1' set but not used [-Wunused-but-set-variable]
---
ERROR: space required after that ',' (ctx:VxV)
#26: FILE: board/mpl/common/flash.c:160:
+ unsigned long flashcr,size_reg;
^
total: 1 errors, 0 warnings, 15 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
Error ignored. No further cleanup attempted.
board/mpl/common/flash.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
board/mpl/common/flash.c +1 -2
@@ -157,7 +157,7 @@ unsigned long flash_init (void)int i;#if !defined(CONFIG_PATI ) -unsigned long size_b1,flashcr,size_reg; +unsigned long flashcr,size_reg;int mode;extern char version_string;char *p = &version_string;
@@ -197,7 +197,6 @@ unsigned long flash_init (void)#if !defined(CONFIG_PATI )/* protect reset vector */ flash_info[0 ].protect[flash_info[0 ].sector_count-1 ] =1 ; - size_b1 =0 ; flash_info[0 ].size = size_b0;/* set up flash cs according to the size */ size_reg=(flash_info[0 ].size >>20 );
Signature · 1 line
1.7.6.4
PATCH 10/14 board/mpl/common/flash.c: Fix GCC 4.6 build warning
Quoted 28 lines
Fix:
../common/flash.c: In function 'flash_init':../common/flash.c:160:16: warning: variable 'size_b1' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Denis Peter <[email protected]>---
ERROR: space required after that ',' (ctx:VxV)
#26: FILE:board/mpl/common/flash.c:160:(quoted diff) +1
-0+ unsigned long flashcr,size_reg; ^total: 1 errors, 0 warnings, 15 lines checked
NOTE: Ignored message types:
COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEError ignored. No further cleanup attempted.
board/mpl/common/flash.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)board/mpl/common/flash.c +0
-0
board/mpl/common/flash.c unsigned long flash_init (void) · line 160
Quoted 5 lines
board/mpl/common/flash.c +1
-1@@ -157,7 +157,7 @@ unsigned long flash_init (void)int i;#if !defined(CONFIG_PATI ) -unsigned long size_b1,flashcr,size_reg; +unsigned long flashcr,size_reg;
Can you please add space after the comma (", ") ? Thank you.
board/mpl/common/flash.c unsigned long flash_init (void) · line 202
Quoted 11 lines
board/mpl/common/flash.c +0
-1int mode;extern char version_string;char *p = &version_string;@@ -197,7 +197,6 @@ unsigned long flash_init (void)#if !defined(CONFIG_PATI )/* protect reset vector */ flash_info[0 ].protect[flash_info[0 ].sector_count-1 ] =1 ; - size_b1 =0 ; flash_info[0 ].size = size_b0;/* set up flash cs according to the size */ size_reg=(flash_info[0 ].size >>20 );
Otherwise, logic looks OK
PATCH 10/14 board/mpl/common/flash.c: Fix GCC 4.6 build warning
Dear Marek Vasut,
Quoted 19 lines · In message <[email protected]> you wrote:
Quoted 19 lines
Fix:
../common/flash.c: In function 'flash_init':../common/flash.c:160:16: warning: variable 'size_b1' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Denis Peter <[email protected]>---
ERROR: space required after that ',' (ctx:VxV)
#26: FILE:board/mpl/common/flash.c:160:(quoted diff) +1
-0+ unsigned long flashcr,size_reg; ^total: 1 errors, 0 warnings, 15 lines checked
NOTE: Ignored message types:
COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEError ignored. No further cleanup attempted.
...
Quoted 4 lines
board/mpl/common/flash.c unsigned long flash_init (void) · line 160
Quoted 2 lines
board/mpl/common/flash.c +1
-1-unsigned long size_b1,flashcr,size_reg; +unsigned long flashcr,size_reg;Can you please add space after the comma (", ") ? Thank you.
No. I intentionally don't start cleaning up this file.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q: How do you play religious roulette?
A: You stand around in a circle and blaspheme and see who gets
struck by lightning first.Wolfgang Denk
AppliedPATCH 10/14 board/mpl/common/flash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 13 lines · In message <[email protected]> you wrote:
Fix:
../common/flash.c: In function 'flash_init':../common/flash.c:160:16: warning: variable 'size_b1' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Denis Peter <[email protected]>---
ERROR: space required after that ',' (ctx:VxV)
#26: FILE:board/mpl/common/flash.c:160:(quoted diff) +1
-0+ unsigned long flashcr,size_reg; ^
Quoted 8 lines
total: 1 errors, 0 warnings, 15 lines checked
NOTE: Ignored message types:
COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEError ignored. No further cleanup attempted.
board/mpl/common/flash.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Make it right before you make it faster.
PATCH 11/14 board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:mpc8610hpcd.c: In function 'pci_init_board':
mpc8610hpcd.c:238:15: warning: variable 'pordevsr' set but not used [-Wunused-but-set-variable]
---
total: 0 errors, 0 warnings, 13 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/freescale/mpc8610hpcd/mpc8610hpcd.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
board/freescale/mpc8610hpcd/mpc8610hpcd.c +1 -2
@@ -235,12 +235,11 @@ void pci_init_board(void)volatile immap_t *immap = (immap_t *)CONFIG_SYS_CCSRBAR ;volatile ccsr_gur_t *gur = &immap->im_gur;struct fsl_pci_info pci_info; -u32 devdisr, pordevsr; +u32 devdisr;int first_free_busno;int pci_agent; devdisr =in_be32 (&gur->devdisr); - pordevsr =in_be32 (&gur->pordevsr); first_free_busno =fsl_pcie_init_board (0 );
Signature · 1 line
1.7.6.4
PATCH 11/14 board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warning
Quoted 5 lines · Wolfgang Denk
Fix:
mpc8610hpcd.c: In function 'pci_init_board':
mpc8610hpcd.c:238:15: warning: variable 'pordevsr' set but not used [-Wunused-but-set-variable]
Quoted 8 lines
Signed-off-by Wolfgang Denk <[email protected]>Cc Kumar Gala <[email protected]>---
total: 0 errors, 0 warnings, 13 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILE
board/freescale/mpc8610hpcd/mpc8610hpcd.c| 3 +--1 files changed, 1 insertions(+), 2 deletions(-)
- k
Wolfgang Denk
AppliedPATCH 11/14 board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 5 lines · In message <[email protected]> you wrote:
Fix:
mpc8610hpcd.c: In function 'pci_init_board':
mpc8610hpcd.c:238:15: warning: variable 'pordevsr' set but not used [-Wunused-but-set-variable]
Quoted 8 lines
Signed-off-by Wolfgang Denk <[email protected]>Cc Kumar Gala <[email protected]>---
total: 0 errors, 0 warnings, 13 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/freescale/mpc8610hpcd/mpc8610hpcd.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The software required `Windows 95 or better', so I installed Linux.
PATCH 12/14 arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:cpu.c: In function 'checkcpu':
cpu.c:51:7: warning: variable 'ver' set but not used [-Wunused-but-set-variable]
---
total: 0 errors, 0 warnings, 21 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
arch/powerpc/cpu/mpc86xx/cpu.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
arch/powerpc/cpu/mpc86xx/cpu.c +0 -3
@@ -48,7 +48,6 @@ checkcpu(void) {sys_info_t sysinfo;uint pvr, svr; -uint ver;uint major, minor;char buf1[32 ], buf2[32 ];volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;
@@ -57,7 +56,6 @@ checkcpu(void)uint msscr0 =mfspr (MSSCR0 ); svr =get_svr (); - ver =SVR_SOC_VER (svr); major =SVR_MAJ (svr); minor =SVR_MIN (svr);
@@ -77,7 +75,6 @@ checkcpu(void)puts ("Core: " ); pvr =get_pvr (); - ver =PVR_E600_VER (pvr); major =PVR_E600_MAJ (pvr); minor =PVR_E600_MIN (pvr);
Signature · 1 line
1.7.6.4
PATCH 12/14 arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning
Quoted 10 lines · Wolfgang Denk
Fix:
cpu.c: In function 'checkcpu':
cpu.c:51:7: warning: variable 'ver' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>Cc Kumar Gala <[email protected]>---
total: 0 errors, 0 warnings, 21 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILE
- k
Wolfgang Denk
AppliedPATCH 12/14 arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 5 lines · In message <[email protected]> you wrote:
Fix:
cpu.c: In function 'checkcpu':
cpu.c:51:7: warning: variable 'ver' set but not used [-Wunused-but-set-variable]
Quoted 8 lines
Signed-off-by Wolfgang Denk <[email protected]>Cc Kumar Gala <[email protected]>---
total: 0 errors, 0 warnings, 21 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEarch/powerpc/cpu/mpc86xx/cpu.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Logic and practical information do not seem to apply here." "You admit that?" "To deny the facts would be illogical, Doctor" -- Spock and McCoy, "A Piece of the Action", stardate unknown
PATCH 13/14 board/sbc405/strataflash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:strataflash.c: In function 'flash_write_cfiword':
strataflash.c:673:11: warning: variable 'ctladdr' set but not used [-Wunused-but-set-variable]
---
total: 0 errors, 0 warnings, 14 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/sbc405/strataflash.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
board/sbc405/strataflash.c +0 -3
@@ -670,14 +670,11 @@ static ulong flash_get_size (ulong base, int banknum)static int flash_write_cfiword (flash_info_t *info,ulong dest,cfiword_t cword) { -cfiptr_t ctladdr;cfiptr_t cptr;int flag; - ctladdr.cp =flash_make_addr (info,0 ,0 ); cptr.cp = (uchar *)dest; -/* Check if Flash is (sufficiently) erased */ switch (info->portwidth) {case FLASH_CFI_8BIT :
Signature · 1 line
1.7.6.4
PATCH 13/14 board/sbc405/strataflash.c: Fix GCC 4.6 build warning
Quoted 23 lines
Fix:
strataflash.c: In function 'flash_write_cfiword':
strataflash.c:673:11: warning: variable 'ctladdr' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>---
total: 0 errors, 0 warnings, 14 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/sbc405/strataflash.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)board/sbc405/strataflash.c +0
-1@@ -670,14 +670,11 @@ static ulong flash_get_size (ulong base, int banknum)static int flash_write_cfiword (flash_info_t *info,ulong dest,cfiword_t cword) { -cfiptr_t ctladdr;
board/sbc405/strataflash.c static ulong flash_get_size (ulong base, int banknum) · line 680
Quoted 10 lines
board/sbc405/strataflash.c +0
-2cfiptr_t cptr;int flag; - ctladdr.cp =flash_make_addr (info,0 ,0 ); cptr.cp = (uchar *)dest; -/* Check if Flash is (sufficiently) erased */ switch (info->portwidth) {case FLASH_CFI_8BIT :
The logic looks OK
Wolfgang Denk
AppliedPATCH 13/14 board/sbc405/strataflash.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 5 lines · In message <[email protected]> you wrote:
Fix:
strataflash.c: In function 'flash_write_cfiword':
strataflash.c:673:11: warning: variable 'ctladdr' set but not used [-Wunused-but-set-variable]
Quoted 7 lines
Signed-off-by Wolfgang Denk <[email protected]>---
total: 0 errors, 0 warnings, 14 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/sbc405/strataflash.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de It seems intuitively obvious to me, which means that it might be wrong. -- Chris Torek
PATCH 14/14 board/emk/top860/top860.c: Fix GCC 4.6 build warning
In reply to Wolfgang DenkFix:top860.c: In function 'initdram':
top860.c:90:11: warning: variable 'j' set but not used [-Wunused-but-set-variable]
Note: No attempts were made to convert this file completely to using I/O accessors. This is left as an exercise for the board maintainer.
---
total: 0 errors, 0 warnings, 25 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
board/emk/top860/top860.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
board/emk/top860/top860.c +4 -3
@@ -34,6 +34,7 @@#include <common.h> #include <commproc.h> #include <mpc8xx.h> +#include <asm/io.h> /***************************************************************************** * UPM table for 60ns EDO RAM at 25 MHz bus/external clock
@@ -87,7 +88,7 @@ phys_size_t initdram (int board_type)*/ if ((ulong ) initdram &0xff000000 ) {volatile uint *addr1, *addr2; -uint i, j; +uint i;upmconfig (UPMA , (uint *) edo_60ns_25MHz_tbl,sizeof (edo_60ns_25MHz_tbl) /sizeof (uint));
@@ -100,8 +101,8 @@ phys_size_t initdram (int board_type)*/ addr1 = (volatile uint *)0 ; addr2 = (volatile uint *)0x00400000 ; -for (i =0 , j =0 ; i <8 ; i++) - j = addr1[0 ]; +for (i =0 ; i <8 ; i++) +in_be32 (addr1);/* * Now check whether we got 4MB or 16MB populated
Signature · 1 line
1.7.6.4
Wolfgang Denk
AppliedPATCH 14/14 board/emk/top860/top860.c: Fix GCC 4.6 build warning
Dear Wolfgang Denk,
Quoted 8 lines · In message <[email protected]> you wrote:
Fix:
top860.c: In function 'initdram':
top860.c:90:11: warning: variable 'j' set but not used [-Wunused-but-set-variable]Note: No attempts were made to convert this file completely to using I/O accessors. This is left as an exercise for the board maintainer.
Quoted 8 lines
Signed-off-by Wolfgang Denk <[email protected]>Cc Reinhard Meyer <[email protected]>---
total: 0 errors, 0 warnings, 25 lines checked
NOTE: Ignored message types:COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILEboard/emk/top860/top860.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Actual war is a very messy business. Very, very messy business. -- Kirk, "A Taste of Armageddon", stardate 3193.0