lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111101730.hfVs4cNN-lkp@intel.com>
Date:   Wed, 10 Nov 2021 17:42:40 +0800
From:   kernel test robot <lkp@...el.com>
To:     Leon Romanovsky <leonro@...dia.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [leon-rdma:devlink 4/16]
 drivers/net/ethernet/intel/ice/ice_devlink.c:501:17: warning: variable 'dev'
 set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git devlink
head:   75088f5c533815580092fd7dca787c06e75ba7ba
commit: 3c73f365d81cf18adf846a4ef36e605ad52acd0a [4/16] devlink: Clean registration of devlink port
config: i386-debian-10.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?id=3c73f365d81cf18adf846a4ef36e605ad52acd0a
        git remote add leon-rdma https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git
        git fetch --no-tags leon-rdma devlink
        git checkout 3c73f365d81cf18adf846a4ef36e605ad52acd0a
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/intel/ice/ice_devlink.c: In function 'ice_devlink_create_pf_port':
>> drivers/net/ethernet/intel/ice/ice_devlink.c:501:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
     501 |  struct device *dev;
         |                 ^~~
   drivers/net/ethernet/intel/ice/ice_devlink.c: In function 'ice_devlink_create_vf_port':
   drivers/net/ethernet/intel/ice/ice_devlink.c:550:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
     550 |  struct device *dev;
         |                 ^~~


vim +/dev +501 drivers/net/ethernet/intel/ice/ice_devlink.c

1adf7ead8204094 Jacob Keller    2020-03-11  486  
1adf7ead8204094 Jacob Keller    2020-03-11  487  /**
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  488   * ice_devlink_create_pf_port - Create a devlink port for this PF
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  489   * @pf: the PF to create a devlink port for
1adf7ead8204094 Jacob Keller    2020-03-11  490   *
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  491   * Create and register a devlink_port for this PF.
1adf7ead8204094 Jacob Keller    2020-03-11  492   *
1adf7ead8204094 Jacob Keller    2020-03-11  493   * Return: zero on success or an error code on failure.
1adf7ead8204094 Jacob Keller    2020-03-11  494   */
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  495  int ice_devlink_create_pf_port(struct ice_pf *pf)
1adf7ead8204094 Jacob Keller    2020-03-11  496  {
71ad8d55f8e5ea1 Danielle Ratson 2020-07-09  497  	struct devlink_port_attrs attrs = {};
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  498  	struct devlink_port *devlink_port;
48d40025b5392dc Jacob Keller    2020-10-07  499  	struct devlink *devlink;
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  500  	struct ice_vsi *vsi;
48d40025b5392dc Jacob Keller    2020-10-07 @501  	struct device *dev;
1adf7ead8204094 Jacob Keller    2020-03-11  502  
48d40025b5392dc Jacob Keller    2020-10-07  503  	dev = ice_pf_to_dev(pf);
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  504  
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  505  	devlink_port = &pf->devlink_port;
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  506  
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  507  	vsi = ice_get_main_vsi(pf);
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  508  	if (!vsi)
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  509  		return -EIO;
1adf7ead8204094 Jacob Keller    2020-03-11  510  
71ad8d55f8e5ea1 Danielle Ratson 2020-07-09  511  	attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  512  	attrs.phys.port_number = pf->hw.bus.func;
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  513  	devlink_port_attrs_set(devlink_port, &attrs);
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  514  	devlink = priv_to_devlink(pf);
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  515  
3c73f365d81cf18 Leon Romanovsky 2021-11-03  516  	devlink_port_register(devlink, devlink_port, vsi->idx);
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  517  	return 0;
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  518  }
2ae0aa4758b0f4a Wojciech Drewek 2021-08-19  519  

:::::: The code at line 501 was first introduced by commit
:::::: 48d40025b5392dc9010eec3c99a5a4b6e5a29d1e ice: refactor devlink_port to be per-VSI

:::::: TO: Jacob Keller <jacob.e.keller@...el.com>
:::::: CC: Jakub Kicinski <kuba@...nel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (34103 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ