Netdev List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kyle Switch <kyle.switch@motor-comm.com>,
	Frank.Sae@motor-comm.com, andrew@lunn.ch, hkallweit1@gmail.com,
	linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jianmin.wang@motor-comm.com, ming.xu@motor-comm.com,
	xiaolin.xu@motor-comm.com, jie.han@motor-comm.com
Subject: Re: [PATCH] net: phy: Add driver for Motorcomm Quad 2.5GbE phy
Date: Thu, 6 Aug 2026 06:28:56 +0800	[thread overview]
Message-ID: <202608060635.338Kkf6r-lkp@intel.com> (raw)
In-Reply-To: <20260714111203.3852126-1-kyle.switch@motor-comm.com>

Hi Kyle,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net/main]
[also build test WARNING on linus/master v7.2-rc6 next-20260805]
[cannot apply to net-next/main]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Kyle-Switch/net-phy-Add-driver-for-Motorcomm-Quad-2-5GbE-phy/20260805-175843
base:   net/main
patch link:    https://lore.kernel.org/r/20260714111203.3852126-1-kyle.switch%40motor-comm.com
patch subject: [PATCH] net: phy: Add driver for Motorcomm Quad 2.5GbE phy
config: powerpc64-randconfig-002-20260806 (https://download.01.org/0day-ci/archive/20260806/202608060635.338Kkf6r-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260806/202608060635.338Kkf6r-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/202608060635.338Kkf6r-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/phy/motorcomm.c:3336:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    3336 |                 if (reg_space == YT8824_RSSR_UTP_SPACE) {
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:3353:44: note: uninitialized use occurs here
    3353 |         return phy_restore_page(phydev, old_page, ret);
         |                                                   ^~~
   drivers/net/phy/motorcomm.c:3336:3: note: remove the 'if' if its condition is always true
    3336 |                 if (reg_space == YT8824_RSSR_UTP_SPACE) {
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:3335:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    3335 |         if (old_page >= 0) {
         |             ^~~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:3353:44: note: uninitialized use occurs here
    3353 |         return phy_restore_page(phydev, old_page, ret);
         |                                                   ^~~
   drivers/net/phy/motorcomm.c:3335:2: note: remove the 'if' if its condition is always true
    3335 |         if (old_page >= 0) {
         |         ^~~~~~~~~~~~~~~~~~
>> drivers/net/phy/motorcomm.c:3332:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    3332 |         if (old_page < 0)
         |             ^~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:3353:44: note: uninitialized use occurs here
    3353 |         return phy_restore_page(phydev, old_page, ret);
         |                                                   ^~~
   drivers/net/phy/motorcomm.c:3332:2: note: remove the 'if' if its condition is always false
    3332 |         if (old_page < 0)
         |         ^~~~~~~~~~~~~~~~~
    3333 |                 goto err_restore_page;
         |                 ~~~~~~~~~~~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:3329:9: note: initialize the variable 'ret' to silence this warning
    3329 |         int ret;
         |                ^
         |                 = 0
>> drivers/net/phy/motorcomm.c:3341:8: warning: variable 'port' is uninitialized when used here [-Wuninitialized]
    3341 |                         if (port == 0 || port == 2) {
         |                             ^~~~
   drivers/net/phy/motorcomm.c:3328:10: note: initialize the variable 'port' to silence this warning
    3328 |         int port;
         |                 ^
         |                  = 0
   drivers/net/phy/motorcomm.c:4464:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    4464 |         if (old_page < 0)
         |             ^~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:4477:44: note: uninitialized use occurs here
    4477 |         return phy_restore_page(phydev, old_page, ret);
         |                                                   ^~~
   drivers/net/phy/motorcomm.c:4464:2: note: remove the 'if' if its condition is always false
    4464 |         if (old_page < 0)
         |         ^~~~~~~~~~~~~~~~~
    4465 |                 goto err_restore_page;
         |                 ~~~~~~~~~~~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:4460:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    4460 |         if (old_page < 0)
         |             ^~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:4477:44: note: uninitialized use occurs here
    4477 |         return phy_restore_page(phydev, old_page, ret);
         |                                                   ^~~
   drivers/net/phy/motorcomm.c:4460:2: note: remove the 'if' if its condition is always false
    4460 |         if (old_page < 0)
         |         ^~~~~~~~~~~~~~~~~
    4461 |                 goto err_restore_page;
         |                 ~~~~~~~~~~~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:4457:9: note: initialize the variable 'ret' to silence this warning
    4457 |         int ret;
         |                ^
         |                 = 0
   drivers/net/phy/motorcomm.c:4641:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    4641 |         if (old_page < 0)
         |             ^~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:4660:44: note: uninitialized use occurs here
    4660 |         return phy_restore_page(phydev, old_page, ret);
         |                                                   ^~~
   drivers/net/phy/motorcomm.c:4641:2: note: remove the 'if' if its condition is always false
    4641 |         if (old_page < 0)
         |         ^~~~~~~~~~~~~~~~~
    4642 |                 goto err_restore_page;
         |                 ~~~~~~~~~~~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:4638:9: note: initialize the variable 'ret' to silence this warning
    4638 |         int ret;
         |                ^
         |                 = 0
   7 warnings generated.


vim +3336 drivers/net/phy/motorcomm.c

  3320	
  3321	/**
  3322	 * disable YT8824 template test mode.
  3323	 */
  3324	static int yt8824_soft_reset_step4_paged(struct phy_device *phydev,
  3325						 int reg_space)
  3326	{
  3327		int old_page;
  3328		int port;
  3329		int ret;
  3330	
  3331		old_page = phy_select_page(phydev, reg_space);
> 3332		if (old_page < 0)
  3333			goto err_restore_page;
  3334	
  3335		if (old_page >= 0) {
> 3336			if (reg_space == YT8824_RSSR_UTP_SPACE) {
  3337				/* normal mode */
  3338				ret = ytphy_write_mmd(phydev, 0x1, 0x0084, 0x0000);
  3339				if (ret < 0)
  3340					goto err_restore_page;
> 3341				if (port == 0 || port == 2) {
  3342					/* read the calibration val of band after power on,
  3343					 * * only for recording.
  3344					 */
  3345					ret = ytphy_read_ext(phydev, 0x043e);
  3346					if (ret < 0)
  3347						goto err_restore_page;
  3348				}
  3349			}
  3350		}
  3351	
  3352	err_restore_page:
  3353		return phy_restore_page(phydev, old_page, ret);
  3354	}
  3355	

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

      parent reply	other threads:[~2026-08-05 22:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 11:12 [PATCH] net: phy: Add driver for Motorcomm Quad 2.5GbE phy Kyle Switch
2026-07-14 21:43 ` Andrew Lunn
2026-07-15 11:56   ` Kyle Switch
2026-07-14 21:46 ` Andrew Lunn
2026-07-15 11:59   ` Kyle Switch
2026-07-15 13:09     ` Andrew Lunn
2026-07-17  3:47       ` Kyle Switch
2026-08-05 12:26 ` kernel test robot
2026-08-05 22:28 ` kernel test robot [this message]

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=202608060635.338Kkf6r-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Frank.Sae@motor-comm.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jianmin.wang@motor-comm.com \
    --cc=jie.han@motor-comm.com \
    --cc=kuba@kernel.org \
    --cc=kyle.switch@motor-comm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=llvm@lists.linux.dev \
    --cc=ming.xu@motor-comm.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=xiaolin.xu@motor-comm.com \
    /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