[chenxing:mstar_v6_5_reorder 357/700] drivers/net/ethernet/cadence/macb_main.c:4077:12: warning: 'msc313_clk_init' defined but not used

kernel test robot <[email protected]> Sun, 02 Aug 2026 06:51:02 +0800
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://github.com/linux-chenxing/linux.git mstar_v6_5_reorder
head:   1a5c60e65ea399670a5384b869c4958338af2799
commit: f4632a2fb4430616482f93927167a2b61385552c [357/700] macb: add hack for tx_ref and rx_ref needed for rmii
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20260802/[email protected]/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260802/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/cadence/macb_main.c:4730:12: warning: 'msc313_init' defined but not used [-Wunused-function]
    4730 | static int msc313_init(struct platform_device *pdev)
         |            ^~~~~~~~~~~
>> drivers/net/ethernet/cadence/macb_main.c:4077:12: warning: 'msc313_clk_init' defined but not used [-Wunused-function]
    4077 | static int msc313_clk_init(struct platform_device *pdev, struct clk **pclk,
         |            ^~~~~~~~~~~~~~~


vim +/msc313_clk_init +4077 drivers/net/ethernet/cadence/macb_main.c

  4076	
> 4077	static int msc313_clk_init(struct platform_device *pdev, struct clk **pclk,
  4078				 struct clk **hclk, struct clk **tx_clk,
  4079				 struct clk **rx_clk, struct clk **tsu_clk)
  4080	{
  4081		struct clk *rx_ref = devm_clk_get_optional(&pdev->dev, "rx_ref");
  4082		struct clk *tx_ref = devm_clk_get_optional(&pdev->dev, "tx_ref");
  4083	
  4084		if (IS_ERR(rx_ref))
  4085			return PTR_ERR(rx_ref);
  4086	
  4087		if (IS_ERR(tx_ref))
  4088			return PTR_ERR(tx_ref);
  4089	
  4090		if (rx_ref)
  4091			clk_prepare_enable(rx_ref);
  4092	
  4093		if (tx_ref)
  4094			clk_prepare_enable(tx_ref);
  4095	
  4096		return macb_clk_init(pdev, pclk, hclk, tx_clk, rx_clk, tsu_clk);
  4097	}
  4098	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki