public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2/3] net: sxgbe: fix logical vs bitwise operation
@ 2014-04-01 13:39 Dan Carpenter
  2014-04-01 20:27 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-04-01 13:39 UTC (permalink / raw)
  To: Byungho An
  Cc: Girish K S, Siva Reddy Kallam, Vipul Pandya, netdev,
	kernel-janitors

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@oracle.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));
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch 2/3] net: sxgbe: fix logical vs bitwise operation
  2014-04-01 13:39 [patch 2/3] net: sxgbe: fix logical vs bitwise operation Dan Carpenter
@ 2014-04-01 20:27 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-04-01 20:27 UTC (permalink / raw)
  To: dan.carpenter
  Cc: bh74.an, ks.giri, siva.kallam, vipul.pandya, netdev,
	kernel-janitors

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 1 Apr 2014 16:39:00 +0300

> 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@oracle.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-01 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-01 13:39 [patch 2/3] net: sxgbe: fix logical vs bitwise operation Dan Carpenter
2014-04-01 20:27 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox