Subject: Re: [net-next 2/9] net: stmmac: platform: Convert to devm_clk_get_enabled() and devm_clk_get_optional_enabled()

From: Simon Horman <[email-masked]>
Date: Thu, 22 Aug 2024 14:25:39 +0100

On Thu, Aug 22, 2024 at 02:47:26AM -0600, Yangtao Li wrote:
> Use devm_clk_get_enabled() and devm_clk_get_optional_enabled()
> to simplify code.
> 
> Signed-off-by: Yangtao Li <[email-masked]>

Hi Yangtao Li,

I feel that I am missing something obvious here,
but this patch fails to build when applied to net-next.

clang-18 for an x86_64 allmodconfig W=1 build says:

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:625:10: error: incompatible pointer types returning 'struct clk *' from a function with result type 'struct plat_stmmacenet_data *' [-Werror,-Wincompatible-pointer-types]
  625 |                 return plat->pclk;
      |                        ^~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:641:10: error: incompatible pointer types returning 'struct reset_control *' from a function with result type 'struct plat_stmmacenet_data *' [-Werror,-Wincompatible-pointer-types]
  641 |                 return plat->stmmac_rst;
      |                        ^~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:646:10: error: incompatible pointer types returning 'struct reset_control *' from a function with result type 'struct plat_stmmacenet_data *' [-Werror,-Wincompatible-pointer-types]
  646 |                 return plat->stmmac_ahb_rst;
      |                        ^~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:437:8: warning: unused variable 'ret' [-Wunused-variable]
  437 |         void *ret;
      |               ^~~