[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140401133900.GB11536@mwanda>
Date: Tue, 1 Apr 2014 16:39:00 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Byungho An <bh74.an@...sung.com>
Cc: Girish K S <ks.giri@...sung.com>,
Siva Reddy Kallam <siva.kallam@...sung.com>,
Vipul Pandya <vipul.pandya@...sung.com>,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch 2/3] net: sxgbe: fix logical vs bitwise operation
Bitwise '|' was intended here instead of logical '||'.
Fixes: 1edb9ca69e8a ('net: sxgbe: add basic framework for Samsung 10Gb ethernet driver')
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_core.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_core.c
index 66d4a74..2e11da0 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_core.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_core.c
@@ -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));
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists