[PATCH net-next 6/9] net: stmmac: rk: combine .set_*_speed() methods

Andrew Lunn andrew at lunn.ch
Thu Jun 12 08:51:19 PDT 2025


On Thu, Jun 12, 2025 at 04:41:07PM +0100, Russell King (Oracle) wrote:
> As a result of the previous patches, many of the .set_rgmii_speed()
> and .set_rmii_speed() implementations are identical apart from the
> interface mode. Add a new .set_speed() function which takes the
> interface mode in addition to the speed, and use it to combine the
> separate implementations, calling the common rk_set_reg_speed()
> function.
> 
> Also convert rk_set_clk_mac_speed() to be called by this new method
> pointer, rather than having these implementations called from both
> .set_*_speed() methods.
> 
> Remove all the error messages from the .set_speed() methods, as these
> return an error code which is propagated up to stmmac_mac_link_up()
> which will print the error.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew



More information about the linux-arm-kernel mailing list