The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [rmk-arm:zii 46/96] drivers/net/dsa/bcm_sf2.c:744:30: warning: unused variable 'priv'
@ 2022-05-27  0:36 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-27  0:36 UTC (permalink / raw)
  To: Russell King; +Cc: kbuild-all, linux-kernel

tree:   git://git.armlinux.org.uk/~rmk/linux-arm zii
head:   c753f621782532ea52e3fc51d84128421e546ee6
commit: 18d04811ce6c67fcd6a047f4323216e153590ba1 [46/96] net: dsa: bcm_sf2: fix pause mode validation
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220527/202205270808.9IZEVfpD-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        git remote add rmk-arm git://git.armlinux.org.uk/~rmk/linux-arm
        git fetch --no-tags rmk-arm zii
        git checkout 18d04811ce6c67fcd6a047f4323216e153590ba1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/dsa/

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

All warnings (new ones prefixed by >>):

   drivers/net/dsa/bcm_sf2.c: In function 'bcm_sf2_sw_validate':
>> drivers/net/dsa/bcm_sf2.c:744:30: warning: unused variable 'priv' [-Wunused-variable]
     744 |         struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
         |                              ^~~~


vim +/priv +744 drivers/net/dsa/bcm_sf2.c

   739	
   740	static void bcm_sf2_sw_validate(struct dsa_switch *ds, int port,
   741					unsigned long *supported,
   742					struct phylink_link_state *state)
   743	{
 > 744		struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
   745		__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
   746		u32 caps;
   747	
   748		caps = dsa_to_port(ds, port)->pl_config.mac_capabilities;
   749	
   750		/* Pause modes are only programmed for these modes - see FIXME 3.
   751		 * So, as pause modes are not configured for other modes, disable
   752		 * support for them.
   753		 */
   754		if (!(state->interface == PHY_INTERFACE_MODE_RGMII ||
   755		      state->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
   756		      state->interface == PHY_INTERFACE_MODE_MII ||
   757		      state->interface == PHY_INTERFACE_MODE_REVMII))
   758			caps &= ~(MAC_ASYM_PAUSE | MAC_SYM_PAUSE);
   759	
   760		/* Allow all the expected bits */
   761		phylink_set(mask, Autoneg);
   762		phylink_set_port_modes(mask);
   763		phylink_get_linkmodes(mask, state->interface, caps);
   764	
   765		linkmode_and(supported, supported, mask);
   766		linkmode_and(state->advertising, state->advertising, mask);
   767	}
   768	

-- 
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-05-27  0:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-27  0:36 [rmk-arm:zii 46/96] drivers/net/dsa/bcm_sf2.c:744:30: warning: unused variable 'priv' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox