Re: [PATCH net-next v1 2/3] net: dsa: microchip: Remove redundant optimization in ksz8_w_phy_bmcr

From: Vladimir Oltean
Date: Wed Dec 06 2023 - 17:37:14 EST


On Tue, Nov 21, 2023 at 04:24:25PM +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@xxxxxxxxxxxxxx>
> ---
> drivers/net/dsa/microchip/ksz8795.c | 95 +++++++++--------------------
> 1 file changed, 28 insertions(+), 67 deletions(-)

The diffstat is nice. It's good that we can benefit from the "(tmp != orig)"
check from _regmap_update_bits().

Reviewed-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>