Thread (4 messages) 4 messages, 4 authors, 2017-03-01

Re: [patch] net/mlx4: && vs & typo

From: Joe Perches <hidden>
Date: 2017-02-28 22:23:50
Also in: kernel-janitors, linux-rdma

On Tue, 2017-02-28 at 15:35 +0000, Bart Van Assche wrote:
On Tue, 2017-02-28 at 15:02 +0300, Dan Carpenter wrote:
quoted
Bitwise & was obviously intended here.
[]
quoted
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h
[]
quoted
@@ -109,7 +109,7 @@ static inline void 	(u8 *addr, u64 mac)
 	int i;
 
 	for (i = ETH_ALEN; i > 0; i--) {
-		addr[i - 1] = mac && 0xFF;
+		addr[i - 1] = mac & 0xFF;
 		mac >>= 8;
 	}
 }
Is this the only place where such a loop occurs?
Seems to be.
Should a put_unaligned_be48()
function be introduced?
Why?  This is used exactly once.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help