All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH net] net: phy: dp83869: fix status reporting for 1000base-x autonegotiation
Date: Thu, 31 Oct 2024 09:37:20 +0800	[thread overview]
Message-ID: <202410310949.CLirAHxH-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20241029-dp83869-1000base-x-v1-1-fcafe360bd98@bootlin.com>
References: <20241029-dp83869-1000base-x-v1-1-fcafe360bd98@bootlin.com>
TO: Romain Gantois <romain.gantois@bootlin.com>
TO: Andrew Lunn <andrew@lunn.ch>
TO: Heiner Kallweit <hkallweit1@gmail.com>
TO: Russell King <linux@armlinux.org.uk>
TO: "David S. Miller" <davem@davemloft.net>
CC: netdev@vger.kernel.org
TO: Eric Dumazet <edumazet@google.com>
TO: Jakub Kicinski <kuba@kernel.org>
TO: Paolo Abeni <pabeni@redhat.com>
TO: Dan Murphy <dmurphy@ti.com>
TO: Florian Fainelli <f.fainelli@gmail.com>
CC: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
CC: Maxime Chevallier <maxime.chevallier@bootlin.com>
CC: linux-kernel@vger.kernel.org
CC: stable@vger.kernel.org
CC: Romain Gantois <romain.gantois@bootlin.com>

Hi Romain,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 94c11e852955b2eef5c4f0b36cfeae7dcf11a759]

url:    https://github.com/intel-lab-lkp/linux/commits/Romain-Gantois/net-phy-dp83869-fix-status-reporting-for-1000base-x-autonegotiation/20241029-173146
base:   94c11e852955b2eef5c4f0b36cfeae7dcf11a759
patch link:    https://lore.kernel.org/r/20241029-dp83869-1000base-x-v1-1-fcafe360bd98%40bootlin.com
patch subject: [PATCH net] net: phy: dp83869: fix status reporting for 1000base-x autonegotiation
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-161-20241031 (https://download.01.org/0day-ci/archive/20241031/202410310949.CLirAHxH-lkp@intel.com/config)
compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b)

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202410310949.CLirAHxH-lkp@intel.com/

smatch warnings:
drivers/net/phy/dp83869.c:206 dp83869_config_aneg() error: uninitialized symbol 'adv'.

vim +/adv +206 drivers/net/phy/dp83869.c

01db923e83779b Dan Murphy     2019-11-13  168  
99f7e4c674a2fd Romain Gantois 2024-10-29  169  static int dp83869_config_aneg(struct phy_device *phydev)
99f7e4c674a2fd Romain Gantois 2024-10-29  170  {
99f7e4c674a2fd Romain Gantois 2024-10-29  171  	struct dp83869_private *dp83869 = phydev->priv;
99f7e4c674a2fd Romain Gantois 2024-10-29  172  	unsigned long *advertising;
99f7e4c674a2fd Romain Gantois 2024-10-29  173  	int err, changed = false;
99f7e4c674a2fd Romain Gantois 2024-10-29  174  	u32 adv;
99f7e4c674a2fd Romain Gantois 2024-10-29  175  
99f7e4c674a2fd Romain Gantois 2024-10-29  176  	if (dp83869->mode != DP83869_RGMII_1000_BASE)
99f7e4c674a2fd Romain Gantois 2024-10-29  177  		return genphy_config_aneg(phydev);
99f7e4c674a2fd Romain Gantois 2024-10-29  178  
99f7e4c674a2fd Romain Gantois 2024-10-29  179  	/* Forcing speed or duplex isn't supported in 1000base-x mode */
99f7e4c674a2fd Romain Gantois 2024-10-29  180  	if (phydev->autoneg != AUTONEG_ENABLE)
99f7e4c674a2fd Romain Gantois 2024-10-29  181  		return 0;
99f7e4c674a2fd Romain Gantois 2024-10-29  182  
99f7e4c674a2fd Romain Gantois 2024-10-29  183  	/* In fiber modes, register locations 0xc0... get mapped to offset 0.
99f7e4c674a2fd Romain Gantois 2024-10-29  184  	 * Unfortunately, the fiber-specific autonegotiation advertisement
99f7e4c674a2fd Romain Gantois 2024-10-29  185  	 * register at address 0xc04 does not have the same bit layout as the
99f7e4c674a2fd Romain Gantois 2024-10-29  186  	 * corresponding standard MII_ADVERTISE register. Thus, functions such
99f7e4c674a2fd Romain Gantois 2024-10-29  187  	 * as genphy_config_advert() will write the advertisement register
99f7e4c674a2fd Romain Gantois 2024-10-29  188  	 * incorrectly.
99f7e4c674a2fd Romain Gantois 2024-10-29  189  	 */
99f7e4c674a2fd Romain Gantois 2024-10-29  190  	advertising = phydev->advertising;
99f7e4c674a2fd Romain Gantois 2024-10-29  191  
99f7e4c674a2fd Romain Gantois 2024-10-29  192  	/* Only allow advertising what this PHY supports */
99f7e4c674a2fd Romain Gantois 2024-10-29  193  	linkmode_and(advertising, advertising,
99f7e4c674a2fd Romain Gantois 2024-10-29  194  		     phydev->supported);
99f7e4c674a2fd Romain Gantois 2024-10-29  195  
99f7e4c674a2fd Romain Gantois 2024-10-29  196  	if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, advertising))
99f7e4c674a2fd Romain Gantois 2024-10-29  197  		adv |= DP83869_BP_FULL_DUPLEX;
99f7e4c674a2fd Romain Gantois 2024-10-29  198  	if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, advertising))
99f7e4c674a2fd Romain Gantois 2024-10-29  199  		adv |= DP83869_BP_PAUSE;
99f7e4c674a2fd Romain Gantois 2024-10-29  200  	if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, advertising))
99f7e4c674a2fd Romain Gantois 2024-10-29  201  		adv |= DP83869_BP_ASYMMETRIC_PAUSE;
99f7e4c674a2fd Romain Gantois 2024-10-29  202  
99f7e4c674a2fd Romain Gantois 2024-10-29  203  	err = phy_modify_changed(phydev, DP83869_FX_ANADV,
99f7e4c674a2fd Romain Gantois 2024-10-29  204  				 DP83869_BP_FULL_DUPLEX | DP83869_BP_PAUSE |
99f7e4c674a2fd Romain Gantois 2024-10-29  205  				 DP83869_BP_ASYMMETRIC_PAUSE,
99f7e4c674a2fd Romain Gantois 2024-10-29 @206  				 adv);
99f7e4c674a2fd Romain Gantois 2024-10-29  207  
99f7e4c674a2fd Romain Gantois 2024-10-29  208  	if (err < 0)
99f7e4c674a2fd Romain Gantois 2024-10-29  209  		return err;
99f7e4c674a2fd Romain Gantois 2024-10-29  210  	else if (err)
99f7e4c674a2fd Romain Gantois 2024-10-29  211  		changed = true;
99f7e4c674a2fd Romain Gantois 2024-10-29  212  
99f7e4c674a2fd Romain Gantois 2024-10-29  213  	return genphy_check_and_restart_aneg(phydev, changed);
99f7e4c674a2fd Romain Gantois 2024-10-29  214  }
99f7e4c674a2fd Romain Gantois 2024-10-29  215  

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

             reply	other threads:[~2024-10-31  1:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31  1:37 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-29  9:30 [PATCH net] net: phy: dp83869: fix status reporting for 1000base-x autonegotiation Romain Gantois
2024-10-29 17:57 ` 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=202410310949.CLirAHxH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.