* [U-Boot] [PATCH] net: Kirkwood_egiga.c: fixed build warnings
@ 2010-03-03 9:57 Prafulla Wadaskar
2010-04-05 5:20 ` Ben Warren
0 siblings, 1 reply; 2+ messages in thread
From: Prafulla Wadaskar @ 2010-03-03 9:57 UTC (permalink / raw)
To: u-boot
This patch fixes following build warnings for kirkwood_egiga.c
kirkwood_egiga.c: In function ?kwgbe_init?:
kirkwood_egiga.c:448: warning: dereferencing type-punned pointer will break strict-aliasing rules
kirkwood_egiga.c: In function ?kwgbe_recv?:
kirkwood_egiga.c:609: warning: dereferencing type-punned pointer will break strict-aliasing rules
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
---
drivers/net/kirkwood_egiga.c | 4 ++--
drivers/net/kirkwood_egiga.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c
index 2ad7fea..25c72df 100644
--- a/drivers/net/kirkwood_egiga.c
+++ b/drivers/net/kirkwood_egiga.c
@@ -445,7 +445,7 @@ static int kwgbe_init(struct eth_device *dev)
KWGBEREG_WR(regs->pmtu, 0);
/* Assignment of Rx CRDB of given RXUQ */
- KWGBEREG_WR(regs->rxcdp[RXUQ].rxcdp, (u32) dkwgbe->p_rxdesc_curr);
+ KWGBEREG_WR(regs->rxcdp[RXUQ], (u32) dkwgbe->p_rxdesc_curr);
/* Enable port Rx. */
KWGBEREG_WR(regs->rqc, (1 << RXUQ));
@@ -606,7 +606,7 @@ static int kwgbe_recv(struct eth_device *dev)
p_rxdesc_curr->buf_size = PKTSIZE_ALIGN;
p_rxdesc_curr->byte_cnt = 0;
- writel((unsigned)p_rxdesc_curr->nxtdesc_p, &dkwgbe->p_rxdesc_curr);
+ writel((unsigned)p_rxdesc_curr->nxtdesc_p, (u32) &dkwgbe->p_rxdesc_curr);
return 0;
}
diff --git a/drivers/net/kirkwood_egiga.h b/drivers/net/kirkwood_egiga.h
index 16d5214..30c773c 100644
--- a/drivers/net/kirkwood_egiga.h
+++ b/drivers/net/kirkwood_egiga.h
@@ -418,7 +418,7 @@ struct kwgbe_registers {
u32 pmtbs;
u8 pad14[0x60c - 0x4ec - 4];
struct kwgbe_rxcdp rxcdp[7];
- u32 rxcdp7;
+ struct kwgbe_rxdesc *rxcdp7;
u32 rqc;
struct kwgbe_txdesc *tcsdp;
u8 pad15[0x6c0 - 0x684 - 4];
--
1.5.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] net: Kirkwood_egiga.c: fixed build warnings
2010-03-03 9:57 [U-Boot] [PATCH] net: Kirkwood_egiga.c: fixed build warnings Prafulla Wadaskar
@ 2010-04-05 5:20 ` Ben Warren
0 siblings, 0 replies; 2+ messages in thread
From: Ben Warren @ 2010-04-05 5:20 UTC (permalink / raw)
To: u-boot
Hi Prafulla,
On 3/3/2010 1:57 AM, Prafulla Wadaskar wrote:
> This patch fixes following build warnings for kirkwood_egiga.c
>
> kirkwood_egiga.c: In function ?kwgbe_init?:
> kirkwood_egiga.c:448: warning: dereferencing type-punned pointer will break strict-aliasing rules
> kirkwood_egiga.c: In function ?kwgbe_recv?:
> kirkwood_egiga.c:609: warning: dereferencing type-punned pointer will break strict-aliasing rules
>
> Signed-off-by: Prafulla Wadaskar<prafulla@marvell.com>
> ---
>
Applied to net repo.
thanks,
Ben
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-05 5:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-03 9:57 [U-Boot] [PATCH] net: Kirkwood_egiga.c: fixed build warnings Prafulla Wadaskar
2010-04-05 5:20 ` Ben Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox