Messages in this thread | | | Subject | Re: [PATCH net-next v1 2/3] net: dsa: microchip: Remove redundant optimization in ksz8_w_phy_bmcr | From | Paolo Abeni <> | Date | Thu, 23 Nov 2023 11:54:57 +0100 |
| |
On Tue, 2023-11-21 at 16:24 +0100, Oleksij Rempel wrote: > Remove the manual checks for register value changes in the > ksz8_w_phy_bmcr function. Instead, rely on regmap_update_bits() for > optimizing register updates. > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > --- > drivers/net/dsa/microchip/ksz8795.c | 95 +++++++++-------------------- > 1 file changed, 28 insertions(+), 67 deletions(-) > > diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c > index 835157815937..4c1e21fd87da 100644 > --- a/drivers/net/dsa/microchip/ksz8795.c > +++ b/drivers/net/dsa/microchip/ksz8795.c > @@ -951,107 +951,68 @@ static int ksz8_w_phy_ctrl(struct ksz_device *dev, int port, u16 val) > static int ksz8_w_phy_bmcr(struct ksz_device *dev, int port, u16 val) > { > const u16 *regs = dev->info->regs; > - u8 restart, ctrl, speed, data; > + u8 restart, speed, ctrl, restart_mask;
Very minor nit and only if you have to repost for some other reason, please respect the reverse x-mas tree above.
Thanks,
Paolo
| |