lkml.org 
[lkml]   [2023]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next v1 2/3] net: dsa: microchip: Remove redundant optimization in ksz8_w_phy_bmcr
From
Date
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

\
 
 \ /
  Last update: 2023-11-23 11:56    [W:0.128 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site