Thread (3 messages) 3 messages, 2 authors, 2022-10-31

Re: [PATCH] net: mdio: fix undefined behavior in bit shift for __mdiobus_register

From: Andrew Lunn <andrew@lunn.ch>
Date: 2022-10-31 12:36:57

 	for (i = 0; i < PHY_MAX_ADDR; i++) {
-		if ((bus->phy_mask & (1 << i)) == 0) {
+		if ((bus->phy_mask & (1U << i)) == 0) {
Please use the BIT() macro.

       Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help