devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christian Marangi <ansuelsmth@gmail.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	netdev@vger.kernel.org
Subject: Re: [net-next PATCH 1/2] net: phy: Add support for new Aeonsemi PHYs
Date: Mon, 24 Mar 2025 11:19:42 +0800	[thread overview]
Message-ID: <202503241125.KKDZ7C9F-lkp@intel.com> (raw)
In-Reply-To: <20250323225439.32400-1-ansuelsmth@gmail.com>

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@intel.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

  parent reply	other threads:[~2025-03-24  3:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-23 22:54 [net-next PATCH 1/2] net: phy: Add support for new Aeonsemi PHYs Christian Marangi
2025-03-23 22:54 ` [net-next PATCH 2/2] dt-bindings: net: Document support for " Christian Marangi
2025-03-24 17:09   ` Rob Herring
2025-03-24  3:19 ` kernel test robot [this message]
2025-03-24 14:03 ` [net-next PATCH 1/2] net: phy: Add support for new " Andrew Lunn
2025-03-24 14:16   ` Christian Marangi
2025-03-24 15:16     ` Andrew Lunn
2025-03-25 12:04       ` Christian Marangi
2025-03-25 20:33         ` Andrew Lunn
2025-03-25 20:41           ` Christian Marangi
2025-03-25 21:36         ` Russell King (Oracle)
2025-03-24 14:55 ` Russell King (Oracle)
2025-03-29 18:51 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202503241125.KKDZ7C9F-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).