From: Marek Vasut Date: Mon, 24 Oct 2011 23:39:58 +0000 (+0000) Subject: GCC4.6: Squash warnings in smsc95xx.c X-Git-Tag: v2011.12-rc1~361 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=79ad54400932d6484178a372fb3b659e3437473b;p=u-boot GCC4.6: Squash warnings in smsc95xx.c 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 Cc: Wolfgang Denk Cc: Simon Glass Cc: Mike Frysinger --- diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c index 97f2729076..7ee4f87eaa 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) {