Re: [PATCH net-next] net: phy: change of_phy_leds() to fwnode_phy_leds()
From: kernel test robot <hidden>
Date: 2026-01-09 03:23:21
Also in:
lkml, llvm, oe-kbuild-all
Hi Jijie, 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/Jijie-Shao/net-phy-change-of_phy_leds-to-fwnode_phy_leds/20260108-153742 base: net-next/main patch link: https://lore.kernel.org/r/20260108073405.3036482-1-shaojijie%40huawei.com patch subject: [PATCH net-next] net: phy: change of_phy_leds() to fwnode_phy_leds() config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260109/202601090427.Duo7dPR0-lkp@intel.com/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260109/202601090427.Duo7dPR0-lkp@intel.com/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 [off-list ref] | Closes: https://lore.kernel.org/oe-kbuild-all/202601090427.Duo7dPR0-lkp@intel.com/ (local) All warnings (new ones prefixed by >>):
quoted
drivers/net/phy/phy_device.c:3291:31: warning: unused variable 'led' [-Wunused-variable]
3291 | struct fwnode_handle *leds, *led;
| ^~~
1 warning generated.
vim +/led +3291 drivers/net/phy/phy_device.c
3287
3288 static int fwnode_phy_leds(struct phy_device *phydev)
3289 {
3290 struct fwnode_handle *fwnode = dev_fwnode(&phydev->mdio.dev);3291 struct fwnode_handle *leds, *led;
3292 int err;
3293
3294 if (!fwnode)
3295 return 0;
3296
3297 leds = fwnode_get_named_child_node(fwnode, "leds");
3298 if (!leds)
3299 return 0;
3300
3301 /* Check if the PHY driver have at least an OP to
3302 * set the LEDs.
3303 */
3304 if (!(phydev->drv->led_brightness_set ||
3305 phydev->drv->led_blink_set ||
3306 phydev->drv->led_hw_control_set)) {
3307 phydev_dbg(phydev, "ignoring leds node defined with no PHY driver support\n");
3308 goto exit;
3309 }
3310
3311 fwnode_for_each_available_child_node_scoped(leds, led) {
3312 err = fwnode_phy_led(phydev, led);
3313 if (err) {
3314 fwnode_handle_put(leds);
3315 phy_leds_unregister(phydev);
3316 return err;
3317 }
3318 }
3319
3320 exit:
3321 fwnode_handle_put(leds);
3322 return 0;
3323 }
3324
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki