public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1251:13: warning: variable 'max_rings' set but not used
@ 2023-11-05 19:59 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-05 19:59 UTC (permalink / raw)
  To: Intiyaz Basha; +Cc: oe-kbuild-all, linux-kernel, Felix Manlunas

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1c41041124bd14dd6610da256a3da4e5b74ce6b1
commit: c33c997346c34ea7b89aec99524ad9632a2f1e0c liquidio: enhanced ethtool --set-channels feature
date:   6 years ago
config: x86_64-buildonly-randconfig-002-20231101 (https://download.01.org/0day-ci/archive/20231106/202311060348.7DFUAcjC-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231106/202311060348.7DFUAcjC-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311060348.7DFUAcjC-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c: In function 'cn23xx_sriov_config':
   drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1253:13: warning: variable 'max_possible_vfs' set but not used [-Wunused-but-set-variable]
    1253 |         u32 max_possible_vfs;
         |             ^~~~~~~~~~~~~~~~
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1251:13: warning: variable 'max_rings' set but not used [-Wunused-but-set-variable]
    1251 |         u32 max_rings, total_rings, max_vfs, rings_per_vf;
         |             ^~~~~~~~~
   drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c: At top level:
   drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1417:6: warning: no previous prototype for 'cn23xx_dump_iq_regs' [-Wmissing-prototypes]
    1417 | void cn23xx_dump_iq_regs(struct octeon_device *oct)
         |      ^~~~~~~~~~~~~~~~~~~


vim +/max_rings +1251 drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c

72c0091293c008 Raghu Vatsavayi 2016-08-31  1247  
c33c997346c34e Intiyaz Basha   2018-04-27  1248  int cn23xx_sriov_config(struct octeon_device *oct)
72c0091293c008 Raghu Vatsavayi 2016-08-31  1249  {
72c0091293c008 Raghu Vatsavayi 2016-08-31  1250  	struct octeon_cn23xx_pf *cn23xx = (struct octeon_cn23xx_pf *)oct->chip;
d13520c7ca7761 Raghu Vatsavayi 2016-11-14 @1251  	u32 max_rings, total_rings, max_vfs, rings_per_vf;
72c0091293c008 Raghu Vatsavayi 2016-08-31  1252  	u32 pf_srn, num_pf_rings;
d13520c7ca7761 Raghu Vatsavayi 2016-11-14  1253  	u32 max_possible_vfs;
72c0091293c008 Raghu Vatsavayi 2016-08-31  1254  
72c0091293c008 Raghu Vatsavayi 2016-08-31  1255  	cn23xx->conf =
72c0091293c008 Raghu Vatsavayi 2016-08-31  1256  		(struct octeon_config *)oct_get_config_info(oct, LIO_23XX);
72c0091293c008 Raghu Vatsavayi 2016-08-31  1257  	switch (oct->rev_id) {
72c0091293c008 Raghu Vatsavayi 2016-08-31  1258  	case OCTEON_CN23XX_REV_1_0:
d13520c7ca7761 Raghu Vatsavayi 2016-11-14  1259  		max_rings = CN23XX_MAX_RINGS_PER_PF_PASS_1_0;
d13520c7ca7761 Raghu Vatsavayi 2016-11-14  1260  		max_possible_vfs = CN23XX_MAX_VFS_PER_PF_PASS_1_0;
72c0091293c008 Raghu Vatsavayi 2016-08-31  1261  		break;
72c0091293c008 Raghu Vatsavayi 2016-08-31  1262  	case OCTEON_CN23XX_REV_1_1:
d13520c7ca7761 Raghu Vatsavayi 2016-11-14  1263  		max_rings = CN23XX_MAX_RINGS_PER_PF_PASS_1_1;
d13520c7ca7761 Raghu Vatsavayi 2016-11-14  1264  		max_possible_vfs = CN23XX_MAX_VFS_PER_PF_PASS_1_1;
72c0091293c008 Raghu Vatsavayi 2016-08-31  1265  		break;
72c0091293c008 Raghu Vatsavayi 2016-08-31  1266  	default:
d13520c7ca7761 Raghu Vatsavayi 2016-11-14  1267  		max_rings = CN23XX_MAX_RINGS_PER_PF;
d13520c7ca7761 Raghu Vatsavayi 2016-11-14  1268  		max_possible_vfs = CN23XX_MAX_VFS_PER_PF;
72c0091293c008 Raghu Vatsavayi 2016-08-31  1269  		break;
72c0091293c008 Raghu Vatsavayi 2016-08-31  1270  	}
d13520c7ca7761 Raghu Vatsavayi 2016-11-14  1271  
c33c997346c34e Intiyaz Basha   2018-04-27  1272  	if (oct->sriov_info.num_pf_rings)
c33c997346c34e Intiyaz Basha   2018-04-27  1273  		num_pf_rings = oct->sriov_info.num_pf_rings;
72c0091293c008 Raghu Vatsavayi 2016-08-31  1274  	else
d13520c7ca7761 Raghu Vatsavayi 2016-11-14  1275  		num_pf_rings = num_present_cpus();
72c0091293c008 Raghu Vatsavayi 2016-08-31  1276  

:::::: The code at line 1251 was first introduced by commit
:::::: d13520c7ca7761346d2787fff1b3b112f87da77a liquidio CN23XX: HW config for VF support

:::::: TO: Raghu Vatsavayi <rvatsavayi@caviumnetworks.com>
:::::: CC: David S. Miller <davem@davemloft.net>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-05 20:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-05 19:59 drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1251:13: warning: variable 'max_rings' set but not used kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox