All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 4359/13037] arch/arm/mach-orion5x/pci.c:909:39: warning: '%d' directive writing between 1 and 11 bytes into a region of size 9
@ 2026-11-30 10:01 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-30 10:01 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   e5aad2bdbbee783611d32599f89cea3f12f9593d
commit: 316c5d0daac1258e13668ff9ce1ae0c76ae9992b [4359/13037] ARM: orion5x: fold plat-orion/pcie.c and hw_pci into pci.c
config: arm-mvebu_v5_defconfig (https://download.01.org/0day-ci/archive/20261130/20261130175332.DGAj4Lk3-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261130/20261130175332.DGAj4Lk3-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/20261130175332.DGAj4Lk3-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/arm/mach-orion5x/pci.c: In function 'pcibios_init_hw.constprop':
>> arch/arm/mach-orion5x/pci.c:909:39: warning: '%d' directive writing between 1 and 11 bytes into a region of size 9 [-Wformat-overflow=]
     909 |         sprintf(sys->io_res_name, "PCI%d I/O", busnr);
         |                                       ^~
   In function 'pcibios_init_resource',
       inlined from 'pcibios_init_hw.constprop' at arch/arm/mach-orion5x/pci.c:950:10:
   arch/arm/mach-orion5x/pci.c:909:35: note: directive argument in the range [-2147483641, 2147483646]
     909 |         sprintf(sys->io_res_name, "PCI%d I/O", busnr);
         |                                   ^~~~~~~~~~~
   arch/arm/mach-orion5x/pci.c:909:9: note: 'sprintf' output between 9 and 19 bytes into a destination of size 12
     909 |         sprintf(sys->io_res_name, "PCI%d I/O", busnr);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +909 arch/arm/mach-orion5x/pci.c

   890	
   891	static int pcibios_init_resource(int busnr, struct pci_sys_data *sys)
   892	{
   893		int ret;
   894		struct resource_entry *window;
   895	
   896		if (list_empty(&sys->resources)) {
   897			pci_add_resource_offset(&sys->resources,
   898				 &iomem_resource, sys->mem_offset);
   899		}
   900	
   901		resource_list_for_each_entry(window, &sys->resources)
   902			if (resource_type(window->res) == IORESOURCE_IO)
   903				return 0;
   904	
   905		sys->io_res.start = (busnr * SZ_64K) ?  : pcibios_min_io;
   906		sys->io_res.end = (busnr + 1) * SZ_64K - 1;
   907		sys->io_res.flags = IORESOURCE_IO;
   908		sys->io_res.name = sys->io_res_name;
 > 909		sprintf(sys->io_res_name, "PCI%d I/O", busnr);
   910	
   911		ret = request_resource(&ioport_resource, &sys->io_res);
   912		if (ret) {
   913			pr_err("PCI: unable to allocate I/O port region (%d)\n", ret);
   914			return ret;
   915		}
   916		pci_add_resource_offset(&sys->resources, &sys->io_res,
   917					sys->io_offset);
   918	
   919		return 0;
   920	}
   921	

-- 
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:[~2026-11-30 10:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 10:01 [linux-next:master 4359/13037] arch/arm/mach-orion5x/pci.c:909:39: warning: '%d' directive writing between 1 and 11 bytes into a region of size 9 kernel test robot

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.