[PATCH v5 07/16] net: dwmac-intel-plat: Use helper rgmii_clock
Jan Petrous
jan.petrous at oss.nxp.com
Fri Nov 22 22:54:16 PST 2024
On Tue, Nov 19, 2024 at 04:44:43PM +0000, Russell King (Oracle) wrote:
> On Tue, Nov 19, 2024 at 04:00:13PM +0100, Jan Petrous via B4 Relay wrote:
> > @@ -31,27 +31,15 @@ struct intel_dwmac_data {
> > static void kmb_eth_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
> > {
> > struct intel_dwmac *dwmac = priv;
> > - unsigned long rate;
> > + long rate;
> > int ret;
>
> So the following becomes:
>
> >
> > rate = clk_get_rate(dwmac->tx_clk);
> >
> > + rate = rgmii_clock(speed);
> > + if (rate < 0) {
> > dev_err(dwmac->dev, "Invalid speed\n");
> > + return;
> > }
>
> Now that I've removed the deleted lines, we can see that the
> clk_get_rate() call there is now redundant. Please remove in
> this change.
Funny I didn't notice that, thanks. I will remove it in v6.
Interesting the redundant clk_get_rate() is there from v5.10.0.
I hope that there was no reason for the clock call, like any platform
discrepancy requiring reading the clock before setting.
BTW, I also removed Reviewed-by: Andrew as the patch was changed.
BR.
/Jan
More information about the linux-arm-kernel
mailing list