[arm:net-queue 147/150] drivers/net/phy/phylink.c:693:62: error: 'capabilties' undeclared; did you mean 'capabilities'?

kernel test robot lkp at intel.com
Mon Aug 14 08:34:20 PDT 2023


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git net-queue
head:   77db594bd684ae74e357f861f7a071ba916cede8
commit: 6e413410e0bef70786948c71d28c39755a98d5e8 [147/150] net: phylink: provide mac_get_caps()
config: arc-randconfig-r004-20230814 (https://download.01.org/0day-ci/archive/20230814/202308142353.kaxo4WiO-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230814/202308142353.kaxo4WiO-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308142353.kaxo4WiO-lkp@intel.com/

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

   drivers/net/phy/phylink.c: In function 'phylink_validate_mac_and_pcs':
>> drivers/net/phy/phylink.c:693:62: error: 'capabilties' undeclared (first use in this function); did you mean 'capabilities'?
     693 |                 phylink_validate_mask_caps(supported, state, capabilties);
         |                                                              ^~~~~~~~~~~
         |                                                              capabilities
   drivers/net/phy/phylink.c:693:62: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/phy/phylink.c:643:23: warning: variable 'capabilities' set but not used [-Wunused-but-set-variable]
     643 |         unsigned long capabilities;
         |                       ^~~~~~~~~~~~


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

   638	
   639	static int phylink_validate_mac_and_pcs(struct phylink *pl, unsigned int mode,
   640						unsigned long *supported,
   641						struct phylink_link_state *state)
   642	{
 > 643		unsigned long capabilities;
   644		struct phylink_pcs *pcs;
   645		int ret;
   646	
   647		/* Get the PCS for this interface mode */
   648		if (pl->using_mac_select_pcs) {
   649			pcs = pl->mac_ops->mac_select_pcs(pl->config, state->interface);
   650			if (IS_ERR(pcs))
   651				return PTR_ERR(pcs);
   652		} else {
   653			pcs = pl->pcs;
   654		}
   655	
   656		if (pcs) {
   657			/* The PCS, if present, must be setup before phylink_create()
   658			 * has been called. If the ops is not initialised, print an
   659			 * error and backtrace rather than oopsing the kernel.
   660			 */
   661			if (!pcs->ops) {
   662				phylink_err(pl, "interface %s: uninitialised PCS\n",
   663					    phy_modes(state->interface));
   664				dump_stack();
   665				return -EINVAL;
   666			}
   667	
   668			/* Validate the link parameters with the PCS */
   669			if (pcs->ops->pcs_validate) {
   670				ret = pcs->ops->pcs_validate(pcs, mode, supported,
   671							     state);
   672				if (ret < 0 || phylink_is_empty_linkmode(supported))
   673					return -EINVAL;
   674	
   675				/* Ensure the advertising mask is a subset of the
   676				 * supported mask.
   677				 */
   678				linkmode_and(state->advertising, state->advertising,
   679					     supported);
   680			}
   681		}
   682	
   683		/* Then validate the link parameters with the MAC */
   684		if (pl->mac_ops->validate) {
   685			pl->mac_ops->validate(pl->config, supported, state);
   686		} else {
   687			if (pl->mac_ops->mac_get_caps)
   688				capabilities = pl->mac_ops->mac_get_caps(pl->config,
   689								state->interface);
   690			else
   691				capabilities = pl->config->mac_capabilities;
   692	
 > 693			phylink_validate_mask_caps(supported, state, capabilties);
   694		}
   695	
   696		return phylink_is_empty_linkmode(supported) ? -EINVAL : 0;
   697	}
   698	

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



More information about the linux-arm-kernel mailing list