lkml.org 
[lkml]   [2022]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[rmk-arm:zii 65/107] drivers/net/dsa/bcm_sf2.c:745:30: warning: unused variable 'priv'
tree:   git://git.armlinux.org.uk/~rmk/linux-arm zii
head: aedc75cf78fca1c8b7052c5d59981354f47e2e48
commit: 78353a06b7aa098b1dc5bad04970b02cbcf312df [65/107] net: dsa: bcm_sf2: fix pause mode validation
config: i386-randconfig-a005 (https://download.01.org/0day-ci/archive/20220622/202206221528.TbeRpvmI-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 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 78353a06b7aa098b1dc5bad04970b02cbcf312df
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 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:745:30: warning: unused variable 'priv' [-Wunused-variable]
745 | struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
| ^~~~


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

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

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

\
 
 \ /
  Last update: 2022-06-22 09:36    [W:0.034 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site