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 46/96] drivers/net/dsa/bcm_sf2.c:744:30: warning: unused variable 'priv'
Date: Fri, 27 May 2022 08:36:10 +0800	[thread overview]
Message-ID: <202205270808.9IZEVfpD-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-05-27  0:37 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=202205270808.9IZEVfpD-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.