[PATCH net-next 2/2] net: stmmac: dwc-qos: use stmmac_pltfr_find_clk()

Jakub Kicinski kuba at kernel.org
Tue Apr 8 12:37:55 PDT 2025


On Mon, 07 Apr 2025 19:38:49 +0100 Russell King (Oracle) wrote:
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
> ---
>  .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c    | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> index cd431f84f34f..f5c68e3b4354 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> @@ -34,16 +34,6 @@ struct tegra_eqos {
>  	struct gpio_desc *reset;
>  };
>  
> -static struct clk *dwc_eth_find_clk(struct plat_stmmacenet_data *plat_dat,
> -				    const char *name)
> -{
> -	for (int i = 0; i < plat_dat->num_clks; i++)
> -		if (strcmp(plat_dat->clks[i].id, name) == 0)
> -			return plat_dat->clks[i].clk;
> -
> -	return NULL;
> -}

Missed one user?

drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:355:25: error: call to undeclared function 'dwc_eth_find_clk'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  355 |         plat_dat->stmmac_clk = dwc_eth_find_clk(plat_dat,
      |                                ^
drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:355:23: error: incompatible integer to pointer conversion assigning to 'struct clk *' from 'int' [-Wint-conversion]
  355 |         plat_dat->stmmac_clk = dwc_eth_find_clk(plat_dat,
      |                              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
  356 |                                                 data->stmmac_clk_name);
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~
-- 
pw-bot: cr



More information about the linux-arm-kernel mailing list