From: Kumar Gala Date: Wed, 20 Oct 2010 06:55:39 +0000 (-0500) Subject: Fix compile warning in uli526x driver X-Git-Tag: v2010.12-rc1~49 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0ef911934fe63495f9d81e359d168b03bd770c1b;p=u-boot Fix compile warning in uli526x driver uli526x.c: In function 'uli526x_init_one': uli526x.c:314:2: warning: dereferencing type-punned pointer will break strict-aliasing rules uli526x.c:314:2: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Kumar Gala --- diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c index 56eee7bee6..d626d68cb0 100644 --- a/drivers/net/uli526x.c +++ b/drivers/net/uli526x.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Freescale Semiconductor, Inc. + * Copyright 2007, 2010 Freescale Semiconductor, Inc. * * Author: Roy Zang , Sep, 2007 * @@ -311,7 +311,8 @@ static int uli526x_init_one(struct eth_device *dev, bd_t *bis) i)); /* Set Node address */ - if (((u16 *) db->srom)[0] == 0xffff || ((u16 *) db->srom)[0] == 0) + if (((db->srom[0] == 0xff) && (db->srom[1] == 0xff)) || + ((db->srom[0] == 0x00) && (db->srom[1] == 0x00))) /* SROM absent, so write MAC address to ID Table */ set_mac_addr(dev); else { /*Exist SROM*/