public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/pci/hotplug/octep_hp.c:312:53: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 7
@ 2025-03-19  6:23 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-03-19  6:23 UTC (permalink / raw)
  To: Shijith Thotton
  Cc: oe-kbuild-all, linux-kernel, Bjorn Helgaas, Vamsi Attunuru

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   81e4f8d68c66da301bb881862735bd74c6241a19
commit: e434e54d3ffcd17eeadfcf3cf434bc1dff36daff PCI: hotplug: Add OCTEON PCI hotplug controller driver
date:   4 months ago
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20250319/202503191406.iySrpFbN-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250319/202503191406.iySrpFbN-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/202503191406.iySrpFbN-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/pci/hotplug/octep_hp.c: In function 'octep_hp_pci_probe':
>> drivers/pci/hotplug/octep_hp.c:312:53: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 7 [-Wformat-truncation=]
     snprintf(intr->name, sizeof(intr->name), "octep_hp_%d", type);
                                                        ^~
   drivers/pci/hotplug/octep_hp.c:312:43: note: directive argument in the range [0, 2147483646]
     snprintf(intr->name, sizeof(intr->name), "octep_hp_%d", type);
                                              ^~~~~~~~~~~~~
   drivers/pci/hotplug/octep_hp.c:312:2: note: 'snprintf' output between 11 and 20 bytes into a destination of size 16
     snprintf(intr->name, sizeof(intr->name), "octep_hp_%d", type);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for GET_FREE_REGION
   Depends on [n]: SPARSEMEM [=n]
   Selected by [m]:
   - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]


vim +312 drivers/pci/hotplug/octep_hp.c

   297	
   298	static int octep_hp_request_irq(struct octep_hp_controller *hp_ctrl,
   299					enum octep_hp_intr_type type)
   300	{
   301		struct pci_dev *pdev = hp_ctrl->pdev;
   302		struct octep_hp_intr_info *intr;
   303		int irq;
   304	
   305		irq = pci_irq_vector(pdev, OCTEP_HP_INTR_VECTOR(type));
   306		if (irq < 0)
   307			return irq;
   308	
   309		intr = &hp_ctrl->intr[type];
   310		intr->number = irq;
   311		intr->type = type;
 > 312		snprintf(intr->name, sizeof(intr->name), "octep_hp_%d", type);
   313	
   314		return devm_request_irq(&pdev->dev, irq, octep_hp_intr_handler,
   315					IRQF_SHARED, intr->name, hp_ctrl);
   316	}
   317	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/pci/hotplug/octep_hp.c:312:53: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 7
@ 2025-07-26 12:06 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-07-26 12:06 UTC (permalink / raw)
  To: Shijith Thotton
  Cc: oe-kbuild-all, linux-kernel, Bjorn Helgaas, Vamsi Attunuru

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5f33ebd2018ced2600b3fad2f8e2052498eb4072
commit: e434e54d3ffcd17eeadfcf3cf434bc1dff36daff PCI: hotplug: Add OCTEON PCI hotplug controller driver
date:   9 months ago
config: powerpc-randconfig-2005-20250726 (https://download.01.org/0day-ci/archive/20250726/202507261457.SXXHOjUk-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250726/202507261457.SXXHOjUk-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/202507261457.SXXHOjUk-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/pci/hotplug/octep_hp.c: In function 'octep_hp_pci_probe':
>> drivers/pci/hotplug/octep_hp.c:312:53: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 7 [-Wformat-truncation=]
     snprintf(intr->name, sizeof(intr->name), "octep_hp_%d", type);
                                                        ^~
   drivers/pci/hotplug/octep_hp.c:312:43: note: directive argument in the range [0, 2147483646]
     snprintf(intr->name, sizeof(intr->name), "octep_hp_%d", type);
                                              ^~~~~~~~~~~~~
   drivers/pci/hotplug/octep_hp.c:312:2: note: 'snprintf' output between 11 and 20 bytes into a destination of size 16
     snprintf(intr->name, sizeof(intr->name), "octep_hp_%d", type);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +312 drivers/pci/hotplug/octep_hp.c

   297	
   298	static int octep_hp_request_irq(struct octep_hp_controller *hp_ctrl,
   299					enum octep_hp_intr_type type)
   300	{
   301		struct pci_dev *pdev = hp_ctrl->pdev;
   302		struct octep_hp_intr_info *intr;
   303		int irq;
   304	
   305		irq = pci_irq_vector(pdev, OCTEP_HP_INTR_VECTOR(type));
   306		if (irq < 0)
   307			return irq;
   308	
   309		intr = &hp_ctrl->intr[type];
   310		intr->number = irq;
   311		intr->type = type;
 > 312		snprintf(intr->name, sizeof(intr->name), "octep_hp_%d", type);
   313	
   314		return devm_request_irq(&pdev->dev, irq, octep_hp_intr_handler,
   315					IRQF_SHARED, intr->name, hp_ctrl);
   316	}
   317	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-26 12:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19  6:23 drivers/pci/hotplug/octep_hp.c:312:53: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 7 kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-07-26 12:06 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