Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on powerpc/next]
[also build test WARNING on powerpc/fixes linus/master v6.19-rc7 next-20260126]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/wenxiong-linux-ibm-com/error-path-improvement-in-dlpar-add/20260127-121714
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    
https://lore.kernel.org/r/20260127021845.2326-1-wenxiong%40linux.ibm.com
patch subject: [PATCH] error path improvement in dlpar add
config: powerpc-allyesconfig 
(https://download.01.org/0day-ci/archive/20260127/[email protected]/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 
9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20260127/[email protected]/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 <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> arch/powerpc/kernel/pci-hotplug.c:182:12: warning: more '%' conversions than 
>> data arguments [-Wformat-insufficient-args]
     182 |                 pr_err("%s: unable to add hotplug pci device!\n");
         |                         ~^
   include/linux/printk.h:555:25: note: expanded from macro 'pr_err'
     555 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |                                ^~~
   include/linux/printk.h:402:21: note: expanded from macro 'pr_fmt'
     402 | #define pr_fmt(fmt) fmt
         |                     ^~~
   include/linux/printk.h:512:53: note: expanded from macro 'printk'
     512 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, 
##__VA_ARGS__)
         |                                                     ^~~
   include/linux/printk.h:484:11: note: expanded from macro 'printk_index_wrap'
     484 |                 _p_func(_fmt, ##__VA_ARGS__);                        
   \
         |                         ^~~~
   1 warning generated.


vim +182 arch/powerpc/kernel/pci-hotplug.c

   125  
   126  /**
   127   * pci_hp_add_devices - adds new pci devices to bus
   128   * @bus: the indicated PCI bus
   129   *
   130   * This routine will find and fixup new pci devices under
   131   * the indicated bus. This routine presumes that there
   132   * might already be some devices under this bridge, so
   133   * it carefully tries to add only new devices.  (And that
   134   * is how this routine differs from other, similar pcibios
   135   * routines.)
   136   */
   137  void pci_hp_add_devices(struct pci_bus *bus)
   138  {
   139          int mode, max;
   140          struct pci_dev *dev;
   141          struct pci_controller *phb;
   142          struct device_node *dn = pci_bus_to_OF_node(bus);
   143          int ret = 0;
   144  
   145          if (!dn)
   146                  return;
   147  
   148          phb = pci_bus_to_host(bus);
   149  
   150          mode = PCI_PROBE_NORMAL;
   151          if (phb->controller_ops.probe_mode)
   152                  mode = phb->controller_ops.probe_mode(bus);
   153  
   154          if (mode == PCI_PROBE_DEVTREE) {
   155                  /* use ofdt-based probe */
   156                  of_rescan_bus(dn, bus);
   157          } else if (mode == PCI_PROBE_NORMAL &&
   158                     dn->child && PCI_DN(dn->child)) {
   159                  /*
   160                   * Use legacy probe. In the partial hotplug case, we
   161                   * probably have grandchildren devices unplugged. So
   162                   * we don't check the return value from pci_scan_slot() 
in
   163                   * order for fully rescan all the way down to pick them 
up.
   164                   * They can have been removed during partial hotplug.
   165                   */
   166                  traverse_siblings_and_scan_slot(dn, bus);
   167                  max = bus->busn_res.start;
   168                  /*
   169                   * Scan bridges that are already configured. We don't 
touch
   170                   * them unless they are misconfigured (which will be 
done in
   171                   * the second scan below).
   172                   */
   173                  for_each_pci_bridge(dev, bus)
   174                          max = pci_scan_bridge(bus, dev, max, 0);
   175  
   176                  /* Scan bridges that need to be reconfigured */
   177                  for_each_pci_bridge(dev, bus)
   178                          max = pci_scan_bridge(bus, dev, max, 1);
   179          }
   180          ret = pcibios_finish_adding_to_bus(bus);
   181          if (ret)
 > 182                  pr_err("%s: unable to add hotplug pci device!\n");

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

Reply via email to