Netdev List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Frank.sae" <frank.sae@motor-comm.com>,
	andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
	kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org,
	davem@davemloft.net, netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	lingyu.zou@motor-comm.com, xiaoyong.li@motor-comm.com,
	jie.han@motor-comm.com
Subject: Re: [PATCH net-next v3] net: phy: motorcomm: add YT8831 2.5G PHY support
Date: Thu, 19 Nov 2026 14:42:13 +0800	[thread overview]
Message-ID: <202611191438.hJl6vCfi-lkp@intel.com> (raw)
In-Reply-To: <20261118033539.36633-1-frank.sae@motor-comm.com>

Hi Frank.sae,

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/Frank-sae/net-phy-motorcomm-add-YT8831-2-5G-PHY-support/20261118-033539
base:   net-next/main
patch link:    https://lore.kernel.org/r/20261118033539.36633-1-frank.sae%40motor-comm.com
patch subject: [PATCH net-next v3] net: phy: motorcomm: add YT8831 2.5G PHY support
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20261119/202611191438.hJl6vCfi-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 3b14d7c370558b46e5f0c6494a05c492e59bf32c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261119/202611191438.hJl6vCfi-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/202611191438.hJl6vCfi-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/phy/motorcomm.c:2782:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    2782 |         if (old_page < 0) {
         |             ^~~~~~~~~~~~
   drivers/net/phy/motorcomm.c:2802:44: note: uninitialized use occurs here
    2802 |         return phy_restore_page(phydev, old_page, ret);
         |                                                   ^~~
   drivers/net/phy/motorcomm.c:2782:2: note: remove the 'if' if its condition is always false
    2782 |         if (old_page < 0) {
         |         ^~~~~~~~~~~~~~~~~~~
    2783 |                 phydev_err(phydev, "Failed to select page: %d\n",
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2784 |                                 old_page);
         |                                 ~~~~~~~~~~
    2785 |                 goto err_restore_page;
         |                 ~~~~~~~~~~~~~~~~~~~~~~
    2786 |         }
         |         ~
   drivers/net/phy/motorcomm.c:2779:19: note: initialize the variable 'ret' to silence this warning
    2779 |         int old_page, ret;
         |                          ^
         |                           = 0
   1 warning generated.


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

  2770	
  2771	/**
  2772	 * yt8831_serdes_init() - serdes init
  2773	 * @phydev: a pointer to a &struct phy_device
  2774	 *
  2775	 * Returns: 0 or negative errno code
  2776	 */
  2777	static int yt8831_serdes_init(struct phy_device *phydev)
  2778	{
  2779		int old_page, ret;
  2780	
  2781		old_page = phy_select_page(phydev, YT8831_RSSR_FIBER_SPACE);
> 2782		if (old_page < 0) {
  2783			phydev_err(phydev, "Failed to select page: %d\n",
  2784					old_page);
  2785			goto err_restore_page;
  2786		}
  2787	
  2788		ret = ytphy_write_ext(phydev, YT8831_SDS_WRITE_PROTECT_REG, 0x1);
  2789		if (ret < 0)
  2790			goto err_restore_page;
  2791	
  2792		ret = ytphy_write_ext(phydev, YT8831_SDS_SGMII_OUTPUT_REG, 0xc4);
  2793		if (ret < 0)
  2794			goto err_restore_page;
  2795	
  2796		/* softreset sds space */
  2797		ret = __phy_modify(phydev, MII_BMCR, BMCR_RESET, BMCR_RESET);
  2798		if (ret < 0)
  2799			goto err_restore_page;
  2800	
  2801	err_restore_page:
  2802		return phy_restore_page(phydev, old_page, ret);
  2803	}
  2804	

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

      parent reply	other threads:[~2026-11-19  6:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  3:35 [PATCH net-next v3] net: phy: motorcomm: add YT8831 2.5G PHY support Frank.sae
2026-11-18 14:14 ` Andrew Lunn
2026-11-18 14:17 ` Andrew Lunn
2026-11-19  5:56 ` Frank.sae
2026-11-19  6:42 ` 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=202611191438.hJl6vCfi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=frank.sae@motor-comm.com \
    --cc=hkallweit1@gmail.com \
    --cc=jie.han@motor-comm.com \
    --cc=kuba@kernel.org \
    --cc=lingyu.zou@motor-comm.com \
    --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=xiaoyong.li@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