Re: [PATCH net-next 2/2] net: phy: phy_link_topology: Lazy-initialize the link topology

From: kernel test robot
Date: Tue May 07 2024 - 19:30:11 EST


Hi Maxime,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url: https://github.com/intel-lab-lkp/linux/commits/Maxime-Chevallier/net-phy-phy_link_topology-Pass-netdevice-to-phy_link_topo-helpers/20240507-183130
base: net-next/main
patch link: https://lore.kernel.org/r/20240507102822.2023826-3-maxime.chevallier%40bootlin.com
patch subject: [PATCH net-next 2/2] net: phy: phy_link_topology: Lazy-initialize the link topology
config: parisc-defconfig (https://download.01.org/0day-ci/archive/20240508/202405080732.pSwJSarc-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240508/202405080732.pSwJSarc-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405080732.pSwJSarc-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> net/core/dev.c:10276:13: warning: 'netdev_free_phy_link_topology' defined but not used [-Wunused-function]
10276 | static void netdev_free_phy_link_topology(struct net_device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/netdev_free_phy_link_topology +10276 net/core/dev.c

10275
10276 static void netdev_free_phy_link_topology(struct net_device *dev)
10277 {
10278 struct phy_link_topology *topo = dev->link_topo;
10279
10280 if (!topo)
10281 return;
10282
10283 xa_destroy(&topo->phys);
10284 kfree(topo);
10285 dev->link_topo = NULL;
10286 }
10287

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