mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/net/ethernet/pensando/ionic/ionic_lif.c:37:11: warning: '%s' directive output may be truncated writing up to 31 bytes into a region of size 25
@ 2023-11-29 21:36 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-29 21:36 UTC (permalink / raw)
  To: Shannon Nelson; +Cc: oe-kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3b47bc037bd44f142ac09848e8d3ecccc726be99
commit: 1d062b7b6f6408fd43f447f90338cfade4168170 ionic: Add basic adminq support
date:   4 years, 3 months ago
config: x86_64-randconfig-014-20230906 (https://download.01.org/0day-ci/archive/20231130/202311300201.lO8v7mKU-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231130/202311300201.lO8v7mKU-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/202311300201.lO8v7mKU-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/pensando/ionic/ionic_lif.c: In function 'ionic_lifs_init':
>> drivers/net/ethernet/pensando/ionic/ionic_lif.c:37:11: warning: '%s' directive output may be truncated writing up to 31 bytes into a region of size 25 [-Wformat-truncation=]
       "%s-%s-%s", IONIC_DRV_NAME, name, q->name);
              ^~
   drivers/net/ethernet/pensando/ionic/ionic_lif.c:36:2: note: 'snprintf' output 8 or more bytes (assuming 39) into a destination of size 32
     snprintf(intr->name, sizeof(intr->name),
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       "%s-%s-%s", IONIC_DRV_NAME, name, q->name);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +37 drivers/net/ethernet/pensando/ionic/ionic_lif.c

    23	
    24	static int ionic_request_irq(struct ionic_lif *lif, struct ionic_qcq *qcq)
    25	{
    26		struct ionic_intr_info *intr = &qcq->intr;
    27		struct device *dev = lif->ionic->dev;
    28		struct ionic_queue *q = &qcq->q;
    29		const char *name;
    30	
    31		if (lif->registered)
    32			name = lif->netdev->name;
    33		else
    34			name = dev_name(dev);
    35	
    36		snprintf(intr->name, sizeof(intr->name),
  > 37			 "%s-%s-%s", IONIC_DRV_NAME, name, q->name);
    38	
    39		return devm_request_irq(dev, intr->vector, ionic_isr,
    40					0, intr->name, &qcq->napi);
    41	}
    42	

-- 
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-29 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 21:36 drivers/net/ethernet/pensando/ionic/ionic_lif.c:37:11: warning: '%s' directive output may be truncated writing up to 31 bytes into a region of size 25 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

all inboxes | Powered by JetHome®