[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202503241125.KKDZ7C9F-lkp@intel.com>
Date: Mon, 24 Mar 2025 11:19:42 +0800
From: kernel test robot <lkp@...el.com>
To: Christian Marangi <ansuelsmth@...il.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
netdev@...r.kernel.org
Subject: Re: [net-next PATCH 1/2] net: phy: Add support for new Aeonsemi PHYs
Hi Christian,
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/Christian-Marangi/dt-bindings-net-Document-support-for-Aeonsemi-PHYs/20250324-065920
base: net-next/main
patch link: https://lore.kernel.org/r/20250323225439.32400-1-ansuelsmth%40gmail.com
patch subject: [net-next PATCH 1/2] net: phy: Add support for new Aeonsemi PHYs
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20250324/202503241125.KKDZ7C9F-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project c2692afc0a92cd5da140dfcdfff7818a5b8ce997)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250324/202503241125.KKDZ7C9F-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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503241125.KKDZ7C9F-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/phy/as21xxx.c:767:14: warning: variable 'val' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
767 | for (i = 0; i < ARRAY_SIZE(as21xxx_led_supported_pattern); i++)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/as21xxx.c:775:33: note: uninitialized use occurs here
775 | VEND1_LED_REG_A_EVENT, val);
| ^~~
drivers/net/phy/as21xxx.c:767:14: note: remove the condition if it is always true
767 | for (i = 0; i < ARRAY_SIZE(as21xxx_led_supported_pattern); i++)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/as21xxx.c:761:9: note: initialize the variable 'val' to silence this warning
761 | u16 val;
| ^
| = 0
1 warning generated.
vim +767 drivers/net/phy/as21xxx.c
757
758 static int as21xxx_led_hw_control_set(struct phy_device *phydev, u8 index,
759 unsigned long rules)
760 {
761 u16 val;
762 int i;
763
764 if (index > AEON_MAX_LDES)
765 return -EINVAL;
766
> 767 for (i = 0; i < ARRAY_SIZE(as21xxx_led_supported_pattern); i++)
768 if (rules == as21xxx_led_supported_pattern[i].pattern) {
769 val = as21xxx_led_supported_pattern[i].val;
770 break;
771 }
772
773 return phy_modify_mmd(phydev, MDIO_MMD_VEND1,
774 VEND1_LED_REG(index),
775 VEND1_LED_REG_A_EVENT, val);
776 }
777
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists