summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/toshiba
diff options
context:
space:
mode:
authorAntoine Ténart <antoine.tenart@free-electrons.com>2014-10-03 17:01:56 +0200
committerDavid S. Miller <davem@davemloft.net>2014-10-05 21:15:16 -0400
commit96aacededcc601f5af894ead6b481e76cc8db2cd (patch)
tree64d8c2369c8e0587796d0148afe1a9b0e91efa42 /drivers/net/ethernet/toshiba
parent0f6a670116921eae11b81f1760e2fff1148712de (diff)
downloadblackbird-obmc-linux-96aacededcc601f5af894ead6b481e76cc8db2cd.tar.gz
blackbird-obmc-linux-96aacededcc601f5af894ead6b481e76cc8db2cd.zip
net: spider_net: avoid using signed char for bitops
Signedness bugs may occur when using signed char for bitops, depending on if the highest bit is ever used. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/toshiba')
-rw-r--r--drivers/net/ethernet/toshiba/spider_net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/toshiba/spider_net.c b/drivers/net/ethernet/toshiba/spider_net.c
index 713313e15c68..8e9371a3388a 100644
--- a/drivers/net/ethernet/toshiba/spider_net.c
+++ b/drivers/net/ethernet/toshiba/spider_net.c
@@ -1325,9 +1325,9 @@ spider_net_set_mac(struct net_device *netdev, void *p)
spider_net_write_reg(card, SPIDER_NET_GMACOPEMD, regvalue);
/* write mac */
- macu = (addr->sa_data[0]<<24) + (addr->sa_data[1]<<16) +
- (addr->sa_data[2]<<8) + (addr->sa_data[3]);
- macl = (addr->sa_data[4]<<8) + (addr->sa_data[5]);
+ macu = (netdev->dev_addr[0]<<24) + (netdev->dev_addr[1]<<16) +
+ (netdev->dev_addr[2]<<8) + (netdev->dev_addr[3]);
+ macl = (netdev->dev_addr[4]<<8) + (netdev->dev_addr[5]);
spider_net_write_reg(card, SPIDER_NET_GMACUNIMACU, macu);
spider_net_write_reg(card, SPIDER_NET_GMACUNIMACL, macl);
OpenPOWER on IntegriCloud