[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1/BBbXOo2Ii68Z/@lunn.ch>
Date: Mon, 31 Oct 2022 13:35:17 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Gaosheng Cui <cuigaosheng1@...wei.com>
Cc: hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
afleming@...escale.com, buytenh@...tstofly.org,
netdev@...r.kernel.org
Subject: Re: [PATCH] net: mdio: fix undefined behavior in bit shift for
__mdiobus_register
> 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
Powered by blists - more mailing lists