Netdev List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: phylib: do not disable autoneg for fixed speeds >= 1G
Date: Thu, 8 Aug 2024 04:46:19 +0800	[thread overview]
Message-ID: <202408080457.vhF74DGf-lkp@intel.com> (raw)
In-Reply-To: <E1sbdxI-0024Eo-HE@rmk-PC.armlinux.org.uk>

Hi Russell,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Russell-King-Oracle/net-phylib-do-not-disable-autoneg-for-fixed-speeds-1G/20240807-185909
base:   net-next/main
patch link:    https://lore.kernel.org/r/E1sbdxI-0024Eo-HE%40rmk-PC.armlinux.org.uk
patch subject: [PATCH net-next] net: phylib: do not disable autoneg for fixed speeds >= 1G
config: arc-randconfig-001-20240808 (https://download.01.org/0day-ci/archive/20240808/202408080457.vhF74DGf-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240808/202408080457.vhF74DGf-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/202408080457.vhF74DGf-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   drivers/net/phy/phy_device.c: In function 'genphy_config_advert':
>> drivers/net/phy/phy_device.c:2124:41: warning: passing argument 1 of 'linkmode_adv_to_mii_adv_t' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    2124 |         adv = linkmode_adv_to_mii_adv_t(advert);
         |                                         ^~~~~~
   In file included from include/uapi/linux/mdio.h:15,
                    from include/linux/mdio.h:9,
                    from drivers/net/phy/phy_device.c:23:
   include/linux/mii.h:143:60: note: expected 'long unsigned int *' but argument is of type 'const long unsigned int *'
     143 | static inline u32 linkmode_adv_to_mii_adv_t(unsigned long *advertising)
         |                                             ~~~~~~~~~~~~~~~^~~~~~~~~~~
>> drivers/net/phy/phy_device.c:2147:46: warning: passing argument 1 of 'linkmode_adv_to_mii_ctrl1000_t' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    2147 |         adv = linkmode_adv_to_mii_ctrl1000_t(advert);
         |                                              ^~~~~~
   include/linux/mii.h:218:65: note: expected 'long unsigned int *' but argument is of type 'const long unsigned int *'
     218 | static inline u32 linkmode_adv_to_mii_ctrl1000_t(unsigned long *advertising)
         |                                                  ~~~~~~~~~~~~~~~^~~~~~~~~~~
   drivers/net/phy/phy_device.c: In function '__genphy_config_aneg':
>> drivers/net/phy/phy_device.c:2401:25: error: implicit declaration of function 'linkmode_set'; did you mean 'linkmode_subset'? [-Werror=implicit-function-declaration]
    2401 |                         linkmode_set(set->bit, fixed_advert);
         |                         ^~~~~~~~~~~~
         |                         linkmode_subset
   cc1: some warnings being treated as errors


vim +2401 drivers/net/phy/phy_device.c

  2359	
  2360	/**
  2361	 * __genphy_config_aneg - restart auto-negotiation or write BMCR
  2362	 * @phydev: target phy_device struct
  2363	 * @changed: whether autoneg is requested
  2364	 *
  2365	 * Description: If auto-negotiation is enabled, we configure the
  2366	 *   advertising, and then restart auto-negotiation.  If it is not
  2367	 *   enabled, then we write the BMCR.
  2368	 */
  2369	int __genphy_config_aneg(struct phy_device *phydev, bool changed)
  2370	{
  2371		__ETHTOOL_DECLARE_LINK_MODE_MASK(fixed_advert);
  2372		const struct phy_setting *set;
  2373		unsigned long *advert;
  2374		int err;
  2375	
  2376		err = genphy_c45_an_config_eee_aneg(phydev);
  2377		if (err < 0)
  2378			return err;
  2379		else if (err)
  2380			changed = true;
  2381	
  2382		err = genphy_setup_master_slave(phydev);
  2383		if (err < 0)
  2384			return err;
  2385		else if (err)
  2386			changed = true;
  2387	
  2388		if (phydev->autoneg == AUTONEG_ENABLE) {
  2389			/* Only allow advertising what this PHY supports */
  2390			linkmode_and(phydev->advertising, phydev->advertising,
  2391				     phydev->supported);
  2392			advert = phydev->advertising;
  2393		} else if (phydev->speed < SPEED_1000) {
  2394			return genphy_setup_forced(phydev);
  2395		} else {
  2396			linkmode_zero(fixed_advert);
  2397	
  2398			set = phy_lookup_setting(phydev->speed, phydev->duplex,
  2399						 phydev->supported, true);
  2400			if (set)
> 2401				linkmode_set(set->bit, fixed_advert);
  2402	
  2403			advert = fixed_advert;
  2404		}
  2405	
  2406		err = genphy_config_advert(phydev, advert);
  2407		if (err < 0) /* error */
  2408			return err;
  2409		else if (err)
  2410			changed = true;
  2411	
  2412		return genphy_check_and_restart_aneg(phydev, changed);
  2413	}
  2414	EXPORT_SYMBOL(__genphy_config_aneg);
  2415	

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

      parent reply	other threads:[~2024-08-07 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 10:31 [PATCH net-next] net: phylib: do not disable autoneg for fixed speeds >= 1G Russell King (Oracle)
2024-08-07 20:36 ` kernel test robot
2024-08-07 20:46 ` 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=202408080457.vhF74DGf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=rmk+kernel@armlinux.org.uk \
    /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