[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205270808.9IZEVfpD-lkp@intel.com>
Date: Fri, 27 May 2022 08:36:10 +0800
From: kernel test robot <lkp@...el.com>
To: Russell King <rmk+kernel@...linux.org.uk>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [rmk-arm:zii 46/96] drivers/net/dsa/bcm_sf2.c:744:30: warning:
unused variable 'priv'
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@...el.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
Powered by blists - more mailing lists