Re: [PATCH] net: mdio: fix undefined behavior in bit shift for __mdiobus_register
From: cuigaosheng <hidden>
Date: 2022-10-31 13:51:06
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 .