public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver
@ 2012-07-27 19:50 Marek Vasut
  2012-07-30  6:32 ` Prafulla Wadaskar
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Marek Vasut @ 2012-07-27 19:50 UTC (permalink / raw)
  To: u-boot

Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function ?armdfec_send?:
armada100_fec.c:589:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
---
 drivers/net/armada100_fec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c
index d318a36..ed7cf20 100644
--- a/drivers/net/armada100_fec.c
+++ b/drivers/net/armada100_fec.c
@@ -565,7 +565,7 @@ static int armdfec_send(struct eth_device *dev, void *dataptr, int datasize)
 	struct tx_desc *p_txdesc = darmdfec->p_txdesc;
 	void *p = (void *)dataptr;
 	int retry = PHY_WAIT_ITERATIONS * PHY_WAIT_MICRO_SECONDS;
-	u32 cmd_sts;
+	u32 cmd_sts, temp;
 
 	/* Copy buffer if it's misaligned */
 	if ((u32)dataptr & 0x07) {
@@ -586,7 +586,8 @@ static int armdfec_send(struct eth_device *dev, void *dataptr, int datasize)
 	p_txdesc->byte_cnt = datasize;
 
 	/* Apply send command using high priority TX queue */
-	writel((u32)p_txdesc, &regs->txcdp[TXQ]);
+	temp = (u32)&regs->txcdp[TXQ];
+	writel((u32)p_txdesc, temp);
 	writel(SDMA_CMD_TXDL | SDMA_CMD_TXDH | SDMA_CMD_ERD, &regs->sdma_cmd);
 
 	/*
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-09-28 15:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-27 19:50 [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver Marek Vasut
2012-07-30  6:32 ` Prafulla Wadaskar
2012-07-30  6:35   ` Marek Vasut
2012-07-30 15:24     ` Joe Hershberger
2012-07-30 15:35       ` Marek Vasut
2012-09-03  9:09 ` Prafulla Wadaskar
2012-09-06  1:50   ` Joe Hershberger
2012-09-28 15:53 ` [U-Boot] [U-Boot-DM] " Joe Hershberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox