[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202506282102.x1tXt0qz-lkp@intel.com>
Date: Sat, 28 Jun 2025 21:05:42 +0200
From: kernel test robot <lkp@...el.com>
To: Jason Xing <kernelxing@...cent.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>
Subject: drivers/net/ethernet/broadcom/bnxt/bnxt.c:10703:9: warning: variable
'j' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aaf724ed69264719550ec4f194d3ab17b886af9a
commit: 9b6a30febddf4857cb4c367f5294bb6118340e30 net: allow rps/rfs related configs to be switched
date: 1 year, 1 month ago
config: powerpc64-randconfig-2005-20250626 (https://download.01.org/0day-ci/archive/20250628/202506282102.x1tXt0qz-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250628/202506282102.x1tXt0qz-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506282102.x1tXt0qz-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_request_irq':
>> drivers/net/ethernet/broadcom/bnxt/bnxt.c:10703:9: warning: variable 'j' set but not used [-Wunused-but-set-variable]
10703 | int i, j, rc = 0;
| ^
drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_setup_int_mode':
drivers/net/ethernet/broadcom/bnxt/bnxt.c:10410:41: warning: '%s' directive output may be truncated writing 4 bytes into a region of size between 2 and 17 [-Wformat-truncation=]
10410 | snprintf(bp->irq_tbl[0].name, len, "%s-%s-%d", bp->dev->name, "TxRx",
| ^~ ~~~~~~
drivers/net/ethernet/broadcom/bnxt/bnxt.c:10410:2: note: 'snprintf' output between 8 and 23 bytes into a destination of size 18
10410 | snprintf(bp->irq_tbl[0].name, len, "%s-%s-%d", bp->dev->name, "TxRx",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10411 | 0);
| ~~
drivers/net/ethernet/broadcom/bnxt/bnxt.c:10395:48: warning: '%s' directive output may be truncated writing between 2 and 4 bytes into a region of size between 2 and 17 [-Wformat-truncation=]
10395 | snprintf(bp->irq_tbl[map_idx].name, len, "%s-%s-%d", dev->name,
| ^~
drivers/net/ethernet/broadcom/bnxt/bnxt.c:10395:3: note: 'snprintf' output between 6 and 33 bytes into a destination of size 18
10395 | snprintf(bp->irq_tbl[map_idx].name, len, "%s-%s-%d", dev->name,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10396 | attr, i);
| ~~~~~~~~
vim +/j +10703 drivers/net/ethernet/broadcom/bnxt/bnxt.c
c0c050c58d8409 Michael Chan 2015-10-22 10700
c0c050c58d8409 Michael Chan 2015-10-22 10701 static int bnxt_request_irq(struct bnxt *bp)
c0c050c58d8409 Michael Chan 2015-10-22 10702 {
b81a90d3028af9 Michael Chan 2016-01-02 @10703 int i, j, rc = 0;
c0c050c58d8409 Michael Chan 2015-10-22 10704 unsigned long flags = 0;
c0c050c58d8409 Michael Chan 2015-10-22 10705 #ifdef CONFIG_RFS_ACCEL
e5811b8c09df9b Michael Chan 2018-03-31 10706 struct cpu_rmap *rmap;
c0c050c58d8409 Michael Chan 2015-10-22 10707 #endif
c0c050c58d8409 Michael Chan 2015-10-22 10708
e5811b8c09df9b Michael Chan 2018-03-31 10709 rc = bnxt_setup_int_mode(bp);
e5811b8c09df9b Michael Chan 2018-03-31 10710 if (rc) {
e5811b8c09df9b Michael Chan 2018-03-31 10711 netdev_err(bp->dev, "bnxt_setup_int_mode err: %x\n",
e5811b8c09df9b Michael Chan 2018-03-31 10712 rc);
e5811b8c09df9b Michael Chan 2018-03-31 10713 return rc;
e5811b8c09df9b Michael Chan 2018-03-31 10714 }
e5811b8c09df9b Michael Chan 2018-03-31 10715 #ifdef CONFIG_RFS_ACCEL
e5811b8c09df9b Michael Chan 2018-03-31 10716 rmap = bp->dev->rx_cpu_rmap;
e5811b8c09df9b Michael Chan 2018-03-31 10717 #endif
c0c050c58d8409 Michael Chan 2015-10-22 10718 if (!(bp->flags & BNXT_FLAG_USING_MSIX))
c0c050c58d8409 Michael Chan 2015-10-22 10719 flags = IRQF_SHARED;
c0c050c58d8409 Michael Chan 2015-10-22 10720
b81a90d3028af9 Michael Chan 2016-01-02 10721 for (i = 0, j = 0; i < bp->cp_nr_rings; i++) {
e5811b8c09df9b Michael Chan 2018-03-31 10722 int map_idx = bnxt_cp_num_to_irq_num(bp, i);
e5811b8c09df9b Michael Chan 2018-03-31 10723 struct bnxt_irq *irq = &bp->irq_tbl[map_idx];
e5811b8c09df9b Michael Chan 2018-03-31 10724
:::::: The code at line 10703 was first introduced by commit
:::::: b81a90d3028af92da61a61e2efd231a585180044 bnxt_en: Re-structure ring indexing and mapping.
:::::: TO: Michael Chan <mchan@...adcom.com>
:::::: CC: David S. Miller <davem@...emloft.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists