mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jason Xing <kernelxing@tencent.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Paolo Abeni <pabeni@redhat.com>
Subject: drivers/net/ethernet/broadcom/bnxt/bnxt.c:10703:9: warning: variable 'j' set but not used
Date: Sat, 28 Jun 2025 21:05:42 +0200	[thread overview]
Message-ID: <202506282102.x1tXt0qz-lkp@intel.com> (raw)

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@intel.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@broadcom.com>
:::::: CC: David S. Miller <davem@davemloft.net>

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

                 reply	other threads:[~2025-06-28 19:06 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=202506282102.x1tXt0qz-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kernelxing@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    /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

all inboxes | Powered by JetHome®