All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/phy/phylink.c:887 phylink_change_inband_advert() error: we previously assumed 'pl->pcs' could be null (see line 870)
@ 2022-08-24 16:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-24 16:24 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4896 bytes --]

BCC: lkp(a)intel.com
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Andrew Lunn <andrew@lunn.ch>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c40e8341e3b3bb27e3a65b06b5b454626234c4f0
commit: 4f1dd48f403149dc720a24c54120749433c4b984 net: phylink: remove pcs_ops member
date:   8 weeks ago
:::::: branch date: 14 hours ago
:::::: commit date: 8 weeks ago
config: openrisc-randconfig-m031-20220824 (https://download.01.org/0day-ci/archive/20220825/202208250056.TryBiAaK-lkp(a)intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/net/phy/phylink.c:887 phylink_change_inband_advert() error: we previously assumed 'pl->pcs' could be null (see line 870)

vim +887 drivers/net/phy/phylink.c

9525ae83959b60 Russell King          2017-07-25  856  
1571e700fd610c Russell King          2020-07-21  857  /*
1571e700fd610c Russell King          2020-07-21  858   * Reconfigure for a change of inband advertisement.
1571e700fd610c Russell King          2020-07-21  859   * If we have a separate PCS, we only need to call its pcs_config() method,
1571e700fd610c Russell King          2020-07-21  860   * and then restart AN if it indicates something changed. Otherwise, we do
1571e700fd610c Russell King          2020-07-21  861   * the full MAC reconfiguration.
1571e700fd610c Russell King          2020-07-21  862   */
1571e700fd610c Russell King          2020-07-21  863  static int phylink_change_inband_advert(struct phylink *pl)
1571e700fd610c Russell King          2020-07-21  864  {
1571e700fd610c Russell King          2020-07-21  865  	int ret;
1571e700fd610c Russell King          2020-07-21  866  
1571e700fd610c Russell King          2020-07-21  867  	if (test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state))
1571e700fd610c Russell King          2020-07-21  868  		return 0;
1571e700fd610c Russell King          2020-07-21  869  
4f1dd48f403149 Russell King (Oracle  2022-06-27 @870) 	if (!pl->pcs && pl->config->legacy_pre_march2020) {
1571e700fd610c Russell King          2020-07-21  871  		/* Legacy method */
1571e700fd610c Russell King          2020-07-21  872  		phylink_mac_config(pl, &pl->link_config);
1571e700fd610c Russell King          2020-07-21  873  		phylink_mac_pcs_an_restart(pl);
1571e700fd610c Russell King          2020-07-21  874  		return 0;
1571e700fd610c Russell King          2020-07-21  875  	}
1571e700fd610c Russell King          2020-07-21  876  
1571e700fd610c Russell King          2020-07-21  877  	phylink_dbg(pl, "%s: mode=%s/%s adv=%*pb pause=%02x\n", __func__,
1571e700fd610c Russell King          2020-07-21  878  		    phylink_an_mode_str(pl->cur_link_an_mode),
1571e700fd610c Russell King          2020-07-21  879  		    phy_modes(pl->link_config.interface),
1571e700fd610c Russell King          2020-07-21  880  		    __ETHTOOL_LINK_MODE_MASK_NBITS, pl->link_config.advertising,
1571e700fd610c Russell King          2020-07-21  881  		    pl->link_config.pause);
1571e700fd610c Russell King          2020-07-21  882  
1571e700fd610c Russell King          2020-07-21  883  	/* Modern PCS-based method; update the advert at the PCS, and
1571e700fd610c Russell King          2020-07-21  884  	 * restart negotiation if the pcs_config() helper indicates that
1571e700fd610c Russell King          2020-07-21  885  	 * the programmed advertisement has changed.
1571e700fd610c Russell King          2020-07-21  886  	 */
4f1dd48f403149 Russell King (Oracle  2022-06-27 @887) 	ret = pl->pcs->ops->pcs_config(pl->pcs, pl->cur_link_an_mode,
1571e700fd610c Russell King          2020-07-21  888  				       pl->link_config.interface,
1571e700fd610c Russell King          2020-07-21  889  				       pl->link_config.advertising,
4f1dd48f403149 Russell King (Oracle  2022-06-27  890) 				       !!(pl->link_config.pause &
4f1dd48f403149 Russell King (Oracle  2022-06-27  891) 					  MLO_PAUSE_AN));
1571e700fd610c Russell King          2020-07-21  892  	if (ret < 0)
1571e700fd610c Russell King          2020-07-21  893  		return ret;
1571e700fd610c Russell King          2020-07-21  894  
1571e700fd610c Russell King          2020-07-21  895  	if (ret > 0)
1571e700fd610c Russell King          2020-07-21  896  		phylink_mac_pcs_an_restart(pl);
1571e700fd610c Russell King          2020-07-21  897  
1571e700fd610c Russell King          2020-07-21  898  	return 0;
1571e700fd610c Russell King          2020-07-21  899  }
1571e700fd610c Russell King          2020-07-21  900  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-24 16:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-24 16:24 drivers/net/phy/phylink.c:887 phylink_change_inband_advert() error: we previously assumed 'pl->pcs' could be null (see line 870) kernel test robot

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.