All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Russell King <rmk+kernel@armlinux.org.uk>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [rmk-arm:zii 65/107] drivers/net/dsa/bcm_sf2.c:745:30: warning: unused variable 'priv'
Date: Wed, 22 Jun 2022 15:34:31 +0800	[thread overview]
Message-ID: <202206221528.TbeRpvmI-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-06-22  7:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202206221528.TbeRpvmI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.