All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android15-6.6 1/1] drivers/net/ethernet/broadcom/bnxt/bnxt.c:9302:16: warning: variable 'j' set but not used
Date: Wed, 25 Mar 2026 19:20:13 +0800	[thread overview]
Message-ID: <202603251943.S7kSMdSW-lkp@intel.com> (raw)

Hi Jason,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android15-6.6
head:   36e33448be90aea3d2e98da271b35aac511b8dc6
commit: 0d71df3e40ed0e0c241abf74e861d0a21de7d5d8 [1/1] UPSTREAM: net: allow rps/rfs related configs to be switched
config: x86_64-randconfig-074-20260325 (https://download.01.org/0day-ci/archive/20260325/202603251943.S7kSMdSW-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260325/202603251943.S7kSMdSW-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/202603251943.S7kSMdSW-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:9302:16: warning: variable 'j' set but not used [-Wunused-but-set-variable]
    9302 |         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:9010:48: warning: '%s' directive output may be truncated writing 4 bytes into a region of size between 2 and 17 [-Wformat-truncation=]
    9010 |         snprintf(bp->irq_tbl[0].name, len, "%s-%s-%d", bp->dev->name, "TxRx",
         |                                                ^~                     ~~~~~~
   In function 'bnxt_setup_inta',
       inlined from 'bnxt_setup_int_mode' at drivers/net/ethernet/broadcom/bnxt/bnxt.c:9030:3:
   drivers/net/ethernet/broadcom/bnxt/bnxt.c:9010:9: note: 'snprintf' output between 8 and 23 bytes into a destination of size 18
    9010 |         snprintf(bp->irq_tbl[0].name, len, "%s-%s-%d", bp->dev->name, "TxRx",
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9011 |                  0);
         |                  ~~
   drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_setup_int_mode':
   drivers/net/ethernet/broadcom/bnxt/bnxt.c:8997:62: warning: '%s' directive output may be truncated writing between 2 and 4 bytes into a region of size between 2 and 17 [-Wformat-truncation=]
    8997 |                 snprintf(bp->irq_tbl[map_idx].name, len, "%s-%s-%d", dev->name,
         |                                                              ^~
   In function 'bnxt_setup_msix',
       inlined from 'bnxt_setup_int_mode' at drivers/net/ethernet/broadcom/bnxt/bnxt.c:9028:3:
   drivers/net/ethernet/broadcom/bnxt/bnxt.c:8997:58: note: directive argument in the range [-2147483641, 2147483646]
    8997 |                 snprintf(bp->irq_tbl[map_idx].name, len, "%s-%s-%d", dev->name,
         |                                                          ^~~~~~~~~~
   drivers/net/ethernet/broadcom/bnxt/bnxt.c:8997:17: note: 'snprintf' output between 6 and 33 bytes into a destination of size 18
    8997 |                 snprintf(bp->irq_tbl[map_idx].name, len, "%s-%s-%d", dev->name,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8998 |                          attr, i);
         |                          ~~~~~~~~


vim +/j +9302 drivers/net/ethernet/broadcom/bnxt/bnxt.c

c0c050c58d8409 Michael Chan 2015-10-22  9299  
c0c050c58d8409 Michael Chan 2015-10-22  9300  static int bnxt_request_irq(struct bnxt *bp)
c0c050c58d8409 Michael Chan 2015-10-22  9301  {
b81a90d3028af9 Michael Chan 2016-01-02 @9302  	int i, j, rc = 0;
c0c050c58d8409 Michael Chan 2015-10-22  9303  	unsigned long flags = 0;
c0c050c58d8409 Michael Chan 2015-10-22  9304  #ifdef CONFIG_RFS_ACCEL
e5811b8c09df9b Michael Chan 2018-03-31  9305  	struct cpu_rmap *rmap;
c0c050c58d8409 Michael Chan 2015-10-22  9306  #endif
c0c050c58d8409 Michael Chan 2015-10-22  9307  
e5811b8c09df9b Michael Chan 2018-03-31  9308  	rc = bnxt_setup_int_mode(bp);
e5811b8c09df9b Michael Chan 2018-03-31  9309  	if (rc) {
e5811b8c09df9b Michael Chan 2018-03-31  9310  		netdev_err(bp->dev, "bnxt_setup_int_mode err: %x\n",
e5811b8c09df9b Michael Chan 2018-03-31  9311  			   rc);
e5811b8c09df9b Michael Chan 2018-03-31  9312  		return rc;
e5811b8c09df9b Michael Chan 2018-03-31  9313  	}
e5811b8c09df9b Michael Chan 2018-03-31  9314  #ifdef CONFIG_RFS_ACCEL
e5811b8c09df9b Michael Chan 2018-03-31  9315  	rmap = bp->dev->rx_cpu_rmap;
e5811b8c09df9b Michael Chan 2018-03-31  9316  #endif
c0c050c58d8409 Michael Chan 2015-10-22  9317  	if (!(bp->flags & BNXT_FLAG_USING_MSIX))
c0c050c58d8409 Michael Chan 2015-10-22  9318  		flags = IRQF_SHARED;
c0c050c58d8409 Michael Chan 2015-10-22  9319  
b81a90d3028af9 Michael Chan 2016-01-02  9320  	for (i = 0, j = 0; i < bp->cp_nr_rings; i++) {
e5811b8c09df9b Michael Chan 2018-03-31  9321  		int map_idx = bnxt_cp_num_to_irq_num(bp, i);
e5811b8c09df9b Michael Chan 2018-03-31  9322  		struct bnxt_irq *irq = &bp->irq_tbl[map_idx];
e5811b8c09df9b Michael Chan 2018-03-31  9323  

:::::: The code at line 9302 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:[~2026-03-25 11:20 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=202603251943.S7kSMdSW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.