From: Stefan Roese Date: Wed, 28 Jan 2009 06:44:23 +0100 Subject: [U-Boot] [PATCH] MIPS: Fix compile warning in au1x00_eth.c Message-ID: <1233121463-25530-1-git-send-email-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This patch fixes this compilation warning: ./MAKEALL dbau1000 Configuring for dbau1x00 board... au1x00_eth.c: In function 'au1x00_send': au1x00_eth.c:158: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type ... Seens with ELDK 4.2 (GCC 4.2.2). Signed-off-by: Stefan Roese --- cpu/mips/au1x00_eth.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cpu/mips/au1x00_eth.c b/cpu/mips/au1x00_eth.c index 6272a3a..5546800 100644 --- a/cpu/mips/au1x00_eth.c +++ b/cpu/mips/au1x00_eth.c @@ -155,7 +155,7 @@ static int au1x00_send(struct eth_device* dev, volatile void *packet, int length /* tx fifo should always be idle */ fifo_tx[next_tx].len = length; - fifo_tx[next_tx].addr = (virt_to_phys(packet))|TX_DMA_ENABLE; + fifo_tx[next_tx].addr = (virt_to_phys((void *)packet))|TX_DMA_ENABLE; au_sync(); udelay(1); @@ -208,7 +208,8 @@ static int au1x00_recv(struct eth_device* dev){ NetReceive(NetRxPackets[next_rx], length - 4); } - fifo_rx[next_rx].addr = (virt_to_phys(NetRxPackets[next_rx]))|RX_DMA_ENABLE; + fifo_rx[next_rx].addr = + virt_to_phys((void *)NetRxPackets[next_rx])|RX_DMA_ENABLE; next_rx++; if(next_rx>=NO_OF_FIFOS){ @@ -249,7 +250,8 @@ static int au1x00_init(struct eth_device* dev, bd_t * bd){ for(i=0;i