Patchwork [U-Boot,04/18] GCC4.6: Squash warnings in 4xx_enet.c

login
register
mail settings
Submitter Marek Vasut
Date Oct. 25, 2011, 9:39 a.m.
Message ID <1319535604-20831-5-git-send-email-marek.vasut@gmail.com>
Download mbox | patch
Permalink /patch/121546/
State Accepted
Headers show

Comments

Marek Vasut - Oct. 25, 2011, 9:39 a.m.
4xx_enet.c: In function 'ppc_4xx_eth_init':
4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'volatile struct mal_desc_t *'
4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
argument 3 has type 'volatile struct mal_desc_t *'
4xx_enet.c:1365: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'unsigned int'
4xx_enet.c:1376: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'unsigned int'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/net/4xx_enet.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Wolfgang Denk - Oct. 27, 2011, 9:59 p.m.
Dear Marek Vasut,

In message <1319535604-20831-5-git-send-email-marek.vasut@gmail.com> you wrote:
> 4xx_enet.c: In function 'ppc_4xx_eth_init':
> 4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
> argument 2 has type 'volatile struct mal_desc_t *'
> 4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
> argument 3 has type 'volatile struct mal_desc_t *'
> 4xx_enet.c:1365: warning: format '%08lx' expects type 'long unsigned int', but
> argument 3 has type 'unsigned int'
> 4xx_enet.c:1376: warning: format '%08lx' expects type 'long unsigned int', but
> argument 3 has type 'unsigned int'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/net/4xx_enet.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index 9ab5c80..8013ad9 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -1349,7 +1349,7 @@  get_speed:
 		hw_p->rx_phys = bd_cached + MAL_TX_DESC_SIZE;
 		hw_p->tx = (mal_desc_t *)(bd_uncached);
 		hw_p->rx = (mal_desc_t *)(bd_uncached + MAL_TX_DESC_SIZE);
-		debug("hw_p->tx=%08x, hw_p->rx=%08x\n", hw_p->tx, hw_p->rx);
+		debug("hw_p->tx=%p, hw_p->rx=%p\n", hw_p->tx, hw_p->rx);
 	}
 
 	for (i = 0; i < NUM_TX_BUFF; i++) {
@@ -1362,7 +1362,7 @@  get_speed:
 		if ((NUM_TX_BUFF - 1) == i)
 			hw_p->tx[i].ctrl |= MAL_TX_CTRL_WRAP;
 		hw_p->tx_run[i] = -1;
-		debug("TX_BUFF %d @ 0x%08lx\n", i, (u32)hw_p->tx[i].data_ptr);
+		debug("TX_BUFF %d @ 0x%08x\n", i, (u32)hw_p->tx[i].data_ptr);
 	}
 
 	for (i = 0; i < NUM_RX_BUFF; i++) {
@@ -1373,7 +1373,7 @@  get_speed:
 			hw_p->rx[i].ctrl |= MAL_RX_CTRL_WRAP;
 		hw_p->rx[i].ctrl |= MAL_RX_CTRL_EMPTY | MAL_RX_CTRL_INTR;
 		hw_p->rx_ready[i] = -1;
-		debug("RX_BUFF %d @ 0x%08lx\n", i, (u32)hw_p->rx[i].data_ptr);
+		debug("RX_BUFF %d @ 0x%08x\n", i, (u32)hw_p->rx[i].data_ptr);
 	}
 
 	reg = 0x00000000;