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

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

From: cuigaosheng <hidden>
Date: 2022-10-31 13:51:06

Please use the BIT() macro.
Thanks for taking time to review this patch, I have made patch v2 and submit it.

On 2022/10/31 20:35, Andrew Lunn wrote:
quoted
  	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