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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 25 Jan 2023 08:54:46 +0800
From:   kernel test robot <lkp@...el.com>
To:     alejandro.lucero-palau@....com, netdev@...r.kernel.org,
        linux-net-drivers@....com
Cc:     oe-kbuild-all@...ts.linux.dev, davem@...emloft.net,
        kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
        habetsm.xilinx@...il.com, ecree.xilinx@...il.com,
        Alejandro Lucero <alejandro.lucero-palau@....com>
Subject: Re: [PATCH v2 net-next 2/8] sfc: add devlink info support for ef100

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/alejandro-lucero-palau-amd-com/sfc-add-devlink-support-for-ef100/20230125-063245
patch link:    https://lore.kernel.org/r/20230124223029.51306-3-alejandro.lucero-palau%40amd.com
patch subject: [PATCH v2 net-next 2/8] sfc: add devlink info support for ef100
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230125/202301250841.TuIjCxZ7-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/c6a73da54918310be8c54a4b2caf2ab4a3419594
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review alejandro-lucero-palau-amd-com/sfc-add-devlink-support-for-ef100/20230125-063245
        git checkout c6a73da54918310be8c54a4b2caf2ab4a3419594
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/net/ethernet/sfc/

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/ethernet/sfc/efx_devlink.c: In function 'efx_devlink_info_running_versions':
>> drivers/net/ethernet/sfc/efx_devlink.c:350:27: warning: variable 'offset' set but not used [-Wunused-but-set-variable]
     350 |         size_t outlength, offset;
         |                           ^~~~~~


vim +/offset +350 drivers/net/ethernet/sfc/efx_devlink.c

   338	
   339	static void efx_devlink_info_running_versions(struct efx_nic *efx,
   340						      struct devlink_info_req *req)
   341	{
   342		MCDI_DECLARE_BUF(outbuf, MC_CMD_GET_VERSION_V5_OUT_LEN);
   343		MCDI_DECLARE_BUF(inbuf, MC_CMD_GET_VERSION_EXT_IN_LEN);
   344		char buf[EFX_MAX_VERSION_INFO_LEN];
   345		union {
   346			const __le32 *dwords;
   347			const __le16 *words;
   348			const char *str;
   349		} ver;
 > 350		size_t outlength, offset;
   351		unsigned int flags;
   352		int rc;
   353	
   354		rc = efx_mcdi_rpc(efx, MC_CMD_GET_VERSION, inbuf, sizeof(inbuf),
   355				  outbuf, sizeof(outbuf), &outlength);
   356		if (rc || outlength < MC_CMD_GET_VERSION_OUT_LEN)
   357			return;
   358	
   359		/* Handle previous output */
   360		if (outlength < MC_CMD_GET_VERSION_V2_OUT_LEN) {
   361			ver.words = (__le16 *)MCDI_PTR(outbuf,
   362						       GET_VERSION_EXT_OUT_VERSION);
   363			offset = snprintf(buf, EFX_MAX_VERSION_INFO_LEN, "%u.%u.%u.%u",
   364					  le16_to_cpu(ver.words[0]),
   365					  le16_to_cpu(ver.words[1]),
   366					  le16_to_cpu(ver.words[2]),
   367					  le16_to_cpu(ver.words[3]));
   368	
   369			devlink_info_version_running_put(req,
   370							 DEVLINK_INFO_VERSION_GENERIC_FW_MGMT,
   371							 buf);
   372			return;
   373		}
   374	
   375		/* Handle V2 additions */
   376		flags = MCDI_DWORD(outbuf, GET_VERSION_V2_OUT_FLAGS);
   377		efx_devlink_info_running_v2(efx, req, flags, outbuf);
   378	
   379		if (outlength < MC_CMD_GET_VERSION_V3_OUT_LEN)
   380			return;
   381	
   382		/* Handle V3 additions */
   383		efx_devlink_info_running_v3(efx, req, flags, outbuf);
   384	
   385		if (outlength < MC_CMD_GET_VERSION_V4_OUT_LEN)
   386			return;
   387	
   388		/* Handle V4 additions */
   389		efx_devlink_info_running_v4(efx, req, flags, outbuf);
   390	
   391		if (outlength < MC_CMD_GET_VERSION_V5_OUT_LEN)
   392			return;
   393	
   394		/* Handle V5 additions */
   395		efx_devlink_info_running_v5(efx, req, flags, outbuf);
   396	}
   397	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ