[U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
Marek Vasut
marek.vasut at gmail.com
Tue Oct 25 11:39:58 CEST 2011
smsc95xx.c: In function 'smsc95xx_write_hwaddr':
smsc95xx.c:380:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules
Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
Cc: Wolfgang Denk <wd at denx.de>
Cc: Simon Glass <sjg at chromium.org>
Cc: Mike Frysinger <vapier at gentoo.org>
---
drivers/usb/eth/smsc95xx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 97f2729..7ee4f87 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -377,7 +377,7 @@ static int smsc95xx_write_hwaddr(struct eth_device *eth)
/* set hardware address */
debug("** %s()\n", __func__);
- addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
+ addr_lo = cpu_to_le32(*eth->enetaddr);
addr_hi = cpu_to_le16(*((u16 *)(eth->enetaddr + 4)));
ret = smsc95xx_write_reg(dev, ADDRL, addr_lo);
if (ret < 0) {
--
1.7.6.3
More information about the U-Boot
mailing list