Skip to content

Commit

Permalink
net: sxgbe: fix logical vs bitwise operation
Browse files Browse the repository at this point in the history
Bitwise '|' was intended here instead of logical '||'.

Fixes: 1edb9ca ('net: sxgbe: add basic framework for Samsung 10Gb ethernet driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Apr 1, 2014
1 parent ca231f8 commit 4f6ed91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/samsung/sxgbe/sxgbe_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ static void sxgbe_core_set_umac_addr(void __iomem *ioaddr, unsigned char *addr,
{
u32 high_word, low_word;

high_word = (addr[5] << 8) || (addr[4]);
low_word = ((addr[3] << 24) || (addr[2] << 16) ||
(addr[1] << 8) || (addr[0]));
high_word = (addr[5] << 8) | (addr[4]);
low_word = (addr[3] << 24) | (addr[2] << 16) |
(addr[1] << 8) | (addr[0]);
writel(high_word, ioaddr + SXGBE_CORE_ADD_HIGHOFFSET(reg_n));
writel(low_word, ioaddr + SXGBE_CORE_ADD_LOWOFFSET(reg_n));
}
Expand Down

0 comments on commit 4f6ed91

Please sign in to comment.