All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Mon, 30 Nov 2026 18:01:59 +0800	[thread overview]
Message-ID: <20261130175332.DGAj4Lk3-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-11-30 10:02 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=20261130175332.DGAj4Lk3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --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.