public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Intiyaz Basha <intiyaz.basha@cavium.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Felix Manlunas <felix.manlunas@cavium.com>
Subject: drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1251:13: warning: variable 'max_rings' set but not used
Date: Mon, 6 Nov 2023 03:59:02 +0800	[thread overview]
Message-ID: <202311060348.7DFUAcjC-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-11-05 20:01 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=202311060348.7DFUAcjC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=felix.manlunas@cavium.com \
    --cc=intiyaz.basha@cavium.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox