Patchwork [U-Boot] drivers/net/xilinx_emaclite.c: Fix compile warning

login
register
mail settings
Submitter Stephan Linz
Date May 22, 2012, 10:18 p.m.
Message ID <1337725091-8342-2-git-send-email-linz@li-pro.net>
Download mbox | patch
Permalink /patch/160753/
State Accepted
Commit 1ae6b9c4e0889b67e54fe2f3fa6a776ad21cf773
Delegated to: Joe Hershberger
Headers show

Comments

Stephan Linz - May 22, 2012, 10:18 p.m.
Fix this:
xilinx_emaclite.c: In function 'xilinx_emaclite_initialize':
xilinx_emaclite.c:371: warning: assignment from incompatible pointer type

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 drivers/net/xilinx_emaclite.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Joe Hershberger - May 23, 2012, 8:11 p.m.
On Tue, May 22, 2012 at 5:18 PM, Stephan Linz <linz@li-pro.net> wrote:
> Fix this:
> xilinx_emaclite.c: In function 'xilinx_emaclite_initialize':
> xilinx_emaclite.c:371: warning: assignment from incompatible pointer type
>
> Signed-off-by: Stephan Linz <linz@li-pro.net>

Applied, thanks.

-Joe

Patch

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 9791b9a..d5bd737 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -199,7 +199,7 @@  static int xemaclite_txbufferavailable(struct eth_device *dev)
 	return !(txpingbusy && txpongbusy);
 }
 
-static int emaclite_send(struct eth_device *dev, volatile void *ptr, int len)
+static int emaclite_send(struct eth_device *dev, void *ptr, int len)
 {
 	u32 reg;
 	u32 baseaddress;
@@ -240,7 +240,7 @@  static int emaclite_send(struct eth_device *dev, volatile void *ptr, int len)
 
 		debug("Send packet from 0x%x\n", baseaddress);
 		/* Write the frame to the buffer */
-		xemaclite_alignedwrite((void *) ptr, baseaddress, len);
+		xemaclite_alignedwrite(ptr, baseaddress, len);
 		out_be32 (baseaddress + XEL_TPLR_OFFSET,(len &
 			(XEL_TPLR_LENGTH_MASK_HI | XEL_TPLR_LENGTH_MASK_LO)));
 		reg = in_be32 (baseaddress + XEL_TSR_OFFSET);
@@ -261,7 +261,7 @@  static int emaclite_send(struct eth_device *dev, volatile void *ptr, int len)
 				& XEL_TSR_XMIT_ACTIVE_MASK) == 0)) {
 			debug("Send packet from 0x%x\n", baseaddress);
 			/* Write the frame to the buffer */
-			xemaclite_alignedwrite((void *) ptr, baseaddress, len);
+			xemaclite_alignedwrite(ptr, baseaddress, len);
 			out_be32 (baseaddress + XEL_TPLR_OFFSET, (len &
 				(XEL_TPLR_LENGTH_MASK_HI |
 					XEL_TPLR_LENGTH_MASK_LO)));