Commit 4f6ed914 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

net: sxgbe: fix logical vs bitwise operation

Bitwise '|' was intended here instead of logical '||'.

Fixes: 1edb9ca6 ('net: sxgbe: add basic framework for Samsung 10Gb ethernet driver')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ca231f83
...@@ -93,9 +93,9 @@ static void sxgbe_core_set_umac_addr(void __iomem *ioaddr, unsigned char *addr, ...@@ -93,9 +93,9 @@ static void sxgbe_core_set_umac_addr(void __iomem *ioaddr, unsigned char *addr,
{ {
u32 high_word, low_word; u32 high_word, low_word;
high_word = (addr[5] << 8) || (addr[4]); high_word = (addr[5] << 8) | (addr[4]);
low_word = ((addr[3] << 24) || (addr[2] << 16) || low_word = (addr[3] << 24) | (addr[2] << 16) |
(addr[1] << 8) || (addr[0])); (addr[1] << 8) | (addr[0]);
writel(high_word, ioaddr + SXGBE_CORE_ADD_HIGHOFFSET(reg_n)); writel(high_word, ioaddr + SXGBE_CORE_ADD_HIGHOFFSET(reg_n));
writel(low_word, ioaddr + SXGBE_CORE_ADD_LOWOFFSET(reg_n)); writel(low_word, ioaddr + SXGBE_CORE_ADD_LOWOFFSET(reg_n));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment