arch/um/drivers/virt-pci.c:537:21: warning: no previous prototype for 'pcibios_get_phb_of_node'

From: kernel test robot
Date: Fri Jun 16 2023 - 23:10:22 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1639fae5132bc8a904af28d97cea0bedb3af802e
commit: 314a1408b79a844dafdcde867d90de5d509409b7 um: virt-pci: implement pcibios_get_phb_of_node()
date: 4 months ago
config: um-randconfig-r026-20230617 (https://download.01.org/0day-ci/archive/20230617/202306171053.SOGnteNi-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230617/202306171053.SOGnteNi-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306171053.SOGnteNi-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> arch/um/drivers/virt-pci.c:537:21: warning: no previous prototype for 'pcibios_get_phb_of_node' [-Wmissing-prototypes]
537 | struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
| ^~~~~~~~~~~~~~~~~~~~~~~


vim +/pcibios_get_phb_of_node +537 arch/um/drivers/virt-pci.c

535
536 /* Copied from arch/x86/kernel/devicetree.c */
> 537 struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
538 {
539 struct device_node *np;
540
541 for_each_node_by_type(np, "pci") {
542 const void *prop;
543 unsigned int bus_min;
544
545 prop = of_get_property(np, "bus-range", NULL);
546 if (!prop)
547 continue;
548 bus_min = be32_to_cpup(prop);
549 if (bus->number == bus_min)
550 return np;
551 }
552 return NULL;
553 }
554

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