dm: sparc: net: Fixup greth compile warnings
Subsystems (2)
PATCH 1/3 dm: sparc: net: Fixup greth compile warnings
greth.c: In function ?greth_recv?:
greth.c:507:3: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?unsigned int? [-Wformat] greth.c:507:3: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 3 has type ?unsigned int? [-Wformat] greth.c:541:6: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]greth.c: In function ?greth_initialize?:
greth.c:623:2: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?struct greth_regs *? [-Wformat] greth.c:655:3: warning: format ?%x? expects argument of type ?unsigned int?, but argument 2 has type ?struct greth_regs *? [-Wformat] greth.c:684:2: warning: format ?%x? expects argument of type ?unsigned int?, but argument 2 has type ?struct greth_regs *? [-Wformat]
--- drivers/net/greth.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/greth.c +5 -5
@@ -483,7 +483,7 @@ int greth_recv(struct eth_device *dev)greth_regs *regs = greth->regs;greth_bd *rxbd;unsigned int status, len =0 , bad; -unsigned char *d; +char *d;int enable =0 ;int i;
@@ -504,7 +504,7 @@ int greth_recv(struct eth_device *dev) goto done; } -debug ("greth_recv: packet 0x%lx, 0x%lx, len: %d\n" , +debug ("greth_recv: packet 0x%x, 0x%x, len: %d\n" , (unsigned int )rxbd, status, status &GRETH_BD_LEN );/* Check status for errors.
@@ -620,7 +620,7 @@ int greth_initialize(bd_t * bis) greth->regs = (greth_regs *) apbdev.address; greth->irq = apbdev.irq; -debug ("Found GRETH at 0x%lx, irq %d\n" , greth->regs, greth->irq); +debug ("Found GRETH at %p, irq %d\n" , greth->regs, greth->irq); dev->priv = (void *)greth; dev->iobase = (unsigned int )greth->regs; dev->init = greth_init;
@@ -652,7 +652,7 @@ int greth_initialize(bd_t * bis)/* initiate PHY, select speed/duplex depending on connected PHY */ if (greth_init_phy (greth, bis)) {/* Failed to init PHY (timedout) */ -debug ("GRETH[0x%08x]: Failed to init PHY\n" , greth->regs); +debug ("GRETH[%p]: Failed to init PHY\n" , greth->regs);return -1 ; }
@@ -681,6 +681,6 @@ int greth_initialize(bd_t * bis)/* set and remember MAC address */ greth_set_hwaddr (greth, addr); -debug ("GRETH[0x%08x]: Initialized successfully\n" , greth->regs); +debug ("GRETH[%p]: Initialized successfully\n" , greth->regs);return 0 ; }
Signature · 1 line
1.7.10.4
PATCH 1/3 dm: sparc: net: Fixup greth compile warnings
Hi Tom,
can you pick these three sparc things by hand please?
Quoted 63 lines
greth.c: In function ?greth_recv?:
greth.c:507:3: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?unsigned int? [-Wformat] greth.c:507:3: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 3 has type ?unsigned int? [-Wformat] greth.c:541:6: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]greth.c: In function ?greth_initialize?:
greth.c:623:2: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?structgreth_regs*? [-Wformat] greth.c:655:3: warning: format ?%x? expects argument of type ?unsigned int?, but argument 2 has type ?structgreth_regs*? [-Wformat] greth.c:684:2: warning: format ?%x? expects argument of type ?unsigned int?, but argument 2 has type ?structgreth_regs*? [-Wformat]Signed-off-by Marek Vasut <[email protected]>Cc Joe Hershberger <[email protected]>Cc Daniel Hellstrom <[email protected]>Cc u-boot-dm at lists.denx.de--- drivers/net/greth.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/net/greth.c +4
-4@@ -483,7 +483,7 @@ int greth_recv(struct eth_device *dev)greth_regs *regs = greth->regs;greth_bd *rxbd;unsigned int status, len =0 , bad; -unsigned char *d; +char *d;int enable =0 ;int i;@@ -504,7 +504,7 @@ int greth_recv(struct eth_device *dev) goto done; } -debug ("greth_recv: packet 0x%lx, 0x%lx, len: %d\n" , +debug ("greth_recv: packet 0x%x, 0x%x, len: %d\n" , (unsigned int )rxbd, status, status &GRETH_BD_LEN );/* Check status for errors. @@ -620,7 +620,7 @@ int greth_initialize(bd_t * bis) greth->regs = (greth_regs *) apbdev.address; greth->irq = apbdev.irq; -debug ("Found GRETH at 0x%lx, irq %d\n" , greth->regs, greth->irq); +debug ("Found GRETH at %p, irq %d\n" , greth->regs, greth->irq); dev->priv = (void *)greth; dev->iobase = (unsigned int )greth->regs; dev->init = greth_init;@@ -652,7 +652,7 @@ int greth_initialize(bd_t * bis)/* initiate PHY, select speed/duplex depending on connected PHY */ if (greth_init_phy (greth, bis)) {/* Failed to init PHY (timedout) */ -debug ("GRETH[0x%08x]: Failed to init PHY\n" , greth->regs); +debug ("GRETH[%p]: Failed to init PHY\n" , greth->regs);return -1 ; }
drivers/net/greth.c int greth_initialize(bd_t * bis) · line 686
Quoted 7 lines
drivers/net/greth.c +1
-1@@ -681,6 +681,6 @@ int greth_initialize(bd_t * bis)/* set and remember MAC address */ greth_set_hwaddr (greth, addr); -debug ("GRETH[0x%08x]: Initialized successfully\n" , greth->regs); +debug ("GRETH[%p]: Initialized successfully\n" , greth->regs);return 0 ; }
Best regards,
Marek Vasut
PATCH 2/3 dm: sparc: common: Fixup cmd_bdinfo warnings
In reply to Marek Vasutcmd_bdinfo.c: In function ?do_bdinfo?:
cmd_bdinfo.c:220:9: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?int? [-Wformat] cmd_bdinfo.c:222:9: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?int? [-Wformat] cmd_bdinfo.c:224:9: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?int? [-Wformat] cmd_bdinfo.c:226:9: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?int? [-Wformat] cmd_bdinfo.c:228:9: warning: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?int? [-Wformat]
--- common/cmd_bdinfo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
common/cmd_bdinfo.c +5 -5
@@ -216,15 +216,15 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])print_num ("flashstart " , bd->bi_flashstart);print_num ("CONFIG_SYS_MONITOR_BASE " ,CONFIG_SYS_MONITOR_BASE );print_num ("CONFIG_ENV_ADDR " ,CONFIG_ENV_ADDR ); -printf ("CONFIG_SYS_RELOC_MONITOR_BASE = 0x%lx (%d)\n" ,CONFIG_SYS_RELOC_MONITOR_BASE , +printf ("CONFIG_SYS_RELOC_MONITOR_BASE = 0x%x (%d)\n" ,CONFIG_SYS_RELOC_MONITOR_BASE ,CONFIG_SYS_MONITOR_LEN ); -printf ("CONFIG_SYS_MALLOC_BASE = 0x%lx (%d)\n" ,CONFIG_SYS_MALLOC_BASE , +printf ("CONFIG_SYS_MALLOC_BASE = 0x%x (%d)\n" ,CONFIG_SYS_MALLOC_BASE ,CONFIG_SYS_MALLOC_LEN ); -printf ("CONFIG_SYS_INIT_SP_OFFSET = 0x%lx (%d)\n" ,CONFIG_SYS_INIT_SP_OFFSET , +printf ("CONFIG_SYS_INIT_SP_OFFSET = 0x%x (%d)\n" ,CONFIG_SYS_INIT_SP_OFFSET ,CONFIG_SYS_STACK_SIZE ); -printf ("CONFIG_SYS_PROM_OFFSET = 0x%lx (%d)\n" ,CONFIG_SYS_PROM_OFFSET , +printf ("CONFIG_SYS_PROM_OFFSET = 0x%x (%d)\n" ,CONFIG_SYS_PROM_OFFSET ,CONFIG_SYS_PROM_SIZE ); -printf ("CONFIG_SYS_GBL_DATA_OFFSET = 0x%lx (%d)\n" ,CONFIG_SYS_GBL_DATA_OFFSET , +printf ("CONFIG_SYS_GBL_DATA_OFFSET = 0x%x (%d)\n" ,CONFIG_SYS_GBL_DATA_OFFSET ,GENERATED_GBL_DATA_SIZE );#if defined(CONFIG_CMD_NET )
Signature · 1 line
1.7.10.4
PATCH 2/3 dm: sparc: common: Fixup cmd_bdinfo warnings
Quoted 10 lines · Marek Vasut
cmd_bdinfo.c: In function ???do_bdinfo???:
cmd_bdinfo.c:220:9: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 2 has type ???int??? [-Wformat] cmd_bdinfo.c:222:9: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 2 has type ???int??? [-Wformat] cmd_bdinfo.c:224:9: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 2 has type ???int??? [-Wformat] cmd_bdinfo.c:226:9: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 2 has type ???int??? [-Wformat] cmd_bdinfo.c:228:9: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 2 has type ???int??? [-Wformat]Signed-off-by Marek Vasut <[email protected]>Cc Daniel Hellstrom <[email protected]>Cc u-boot-dm at lists.denx.de
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120918/80ef0aa8/attachment.pgp>
PATCH 3/3 dm: sparc: Fixup the compile warnings in sparc code
In reply to Marek Vasut--- arch/sparc/cpu/leon2/interrupts.c | 6 +++--- arch/sparc/cpu/leon3/interrupts.c | 6 +++--- arch/sparc/lib/board.c | 1 - 3 files changed, 6 insertions(+), 7 deletions(-)
arch/sparc/cpu/leon2/interrupts.c +3 -3
@@ -207,9 +207,9 @@ void do_irqinfo(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const afor (irq =0 ; irq <NR_IRQS ; irq++) {if (irq_handlers[irq].handler !=NULL ) { -printf ("%02d %08lx %08lx %ld\n" , irq, - (unsigned int )irq_handlers[irq].handler, - (unsigned int )irq_handlers[irq].arg, +printf ("%02d %p %p %d\n" , irq, + irq_handlers[irq].handler, + irq_handlers[irq].arg, irq_handlers[irq].count); } }
arch/sparc/cpu/leon3/interrupts.c +3 -3
@@ -209,9 +209,9 @@ void do_irqinfo(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const afor (irq =0 ; irq <NR_IRQS ; irq++) {if (irq_handlers[irq].handler !=NULL ) { -printf ("%02d %08lx %08lx %ld\n" , irq, - (unsigned int )irq_handlers[irq].handler, - (unsigned int )irq_handlers[irq].arg, +printf ("%02d %p %p %d\n" , irq, + irq_handlers[irq].handler, + irq_handlers[irq].arg, irq_handlers[irq].count); } }
arch/sparc/lib/board.c +0 -1
@@ -166,7 +166,6 @@ char *str_init_seq_done = "\n\rInit sequence done...\r\n\r\n";void board_init_f (ulong bootflag) {bd_t *bd; -unsigned char *s;init_fnc_t **init_fnc_ptr;int j;
Signature · 1 line
1.7.10.4
PATCH 3/3 dm: sparc: Fixup the compile warnings in sparc code
Quoted 3 lines · Marek Vasut
Signed-off-by Marek Vasut <[email protected]>Cc Daniel Hellstrom <[email protected]>Cc u-boot-dm at lists.denx.de
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120918/14fcae68/attachment.pgp>
PATCH 1/3 dm: sparc: net: Fixup greth compile warnings
In reply to Marek VasutQuoted 9 lines · Marek Vasut
greth.c: In function ???greth_recv???:
greth.c:507:3: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 2 has type ???unsigned int??? [-Wformat] greth.c:507:3: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 3 has type ???unsigned int??? [-Wformat] greth.c:541:6: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]greth.c: In function ???greth_initialize???:
greth.c:623:2: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 2 has type ???structgreth_regs*??? [-Wformat] greth.c:655:3: warning: format ???%x??? expects argument of type ???unsigned int???, but argument 2 has type ???structgreth_regs*??? [-Wformat] greth.c:684:2: warning: format ???%x??? expects argument of type ???unsigned int???, but argument 2 has type ???structgreth_regs*??? [-Wformat]
Quoted 4 lines
Signed-off-by Marek Vasut <[email protected]>Cc Joe Hershberger <[email protected]>Cc Daniel Hellstrom <[email protected]>Cc u-boot-dm at lists.denx.de
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120918/2dea6601/attachment.pgp>
PATCH 1/3 dm: sparc: net: Fixup greth compile warnings
Dear Tom Rini,
Quoted 17 lines · Marek Vasut
Quoted 16 lines
greth.c: In function ???greth_recv???:
greth.c:507:3: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 2 has type ???unsigned int??? [-Wformat] greth.c:507:3: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 3 has type ???unsigned int??? [-Wformat] greth.c:541:6: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]greth.c: In function ???greth_initialize???:
greth.c:623:2: warning: format ???%lx??? expects argument of type ???long unsigned int???, but argument 2 has type ???structgreth_regs*??? [-Wformat] greth.c:655:3: warning: format ???%x??? expects argument of type ???unsigned int???, but argument 2 has type ???structgreth_regs*??? [-Wformat] greth.c:684:2: warning: format ???%x??? expects argument of type ???unsigned int???, but argument 2 has type ???structgreth_regs*??? [-Wformat]
Quoted 6 lines
Quoted 4 lines
Signed-off-by Marek Vasut <[email protected]>Cc Joe Hershberger <[email protected]>Cc Daniel Hellstrom <[email protected]>Cc u-boot-dm at lists.denx.deApplied to u-boot/master, thanks!
I wonder if we shouldn't throw all that sparc crap away ... same with m68k. It's starting to rot, noone uses it anymore anyway.
Best regards,
Marek Vasut