[mingo-tip:sched/headers 2170/2340] arch/x86/pci/bus_numa.c:24:5: warning: no previous prototype for 'x86_pci_root_bus_node'
From: kernel test robot
Date: Wed Feb 23 2022 - 20:40:17 EST
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 97c5eeb4de3ad324ed2a4656b46465299cfd010a
commit: d1464f1f51594b5388839a7fd0f4701ff84c3092 [2170/2340] headers/deps: pci: Optimize <linux/pci.h> dependencies, remove <linux/topology.h> inclusion
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220224/202202240933.QRPHsCZw-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=d1464f1f51594b5388839a7fd0f4701ff84c3092
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout d1464f1f51594b5388839a7fd0f4701ff84c3092
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
>> arch/x86/pci/bus_numa.c:24:5: warning: no previous prototype for 'x86_pci_root_bus_node' [-Wmissing-prototypes]
24 | int x86_pci_root_bus_node(int bus)
| ^~~~~~~~~~~~~~~~~~~~~
>> arch/x86/pci/bus_numa.c:34:6: warning: no previous prototype for 'x86_pci_root_bus_resources' [-Wmissing-prototypes]
34 | void x86_pci_root_bus_resources(int bus, struct list_head *resources)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/x86_pci_root_bus_node +24 arch/x86/pci/bus_numa.c
67f241f4579651 Yinghai Lu 2009-11-11 23
afcf21c2beca66 Bjorn Helgaas 2014-01-24 @24 int x86_pci_root_bus_node(int bus)
afcf21c2beca66 Bjorn Helgaas 2014-01-24 25 {
afcf21c2beca66 Bjorn Helgaas 2014-01-24 26 struct pci_root_info *info = x86_find_pci_root_info(bus);
afcf21c2beca66 Bjorn Helgaas 2014-01-24 27
afcf21c2beca66 Bjorn Helgaas 2014-01-24 28 if (!info)
afcf21c2beca66 Bjorn Helgaas 2014-01-24 29 return NUMA_NO_NODE;
afcf21c2beca66 Bjorn Helgaas 2014-01-24 30
afcf21c2beca66 Bjorn Helgaas 2014-01-24 31 return info->node;
afcf21c2beca66 Bjorn Helgaas 2014-01-24 32 }
afcf21c2beca66 Bjorn Helgaas 2014-01-24 33
d28e5ac2a07e27 Yinghai Lu 2012-04-02 @34 void x86_pci_root_bus_resources(int bus, struct list_head *resources)
d28e5ac2a07e27 Yinghai Lu 2012-04-02 35 {
d28e5ac2a07e27 Yinghai Lu 2012-04-02 36 struct pci_root_info *info = x86_find_pci_root_info(bus);
d28e5ac2a07e27 Yinghai Lu 2012-04-02 37 struct pci_root_res *root_res;
14d76b68f2819a Jiang Liu 2015-02-05 38 struct resource_entry *window;
a10bb128b64fe0 Yinghai Lu 2012-05-17 39 bool found = false;
d28e5ac2a07e27 Yinghai Lu 2012-04-02 40
d28e5ac2a07e27 Yinghai Lu 2012-04-02 41 if (!info)
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 42 goto default_resources;
67f241f4579651 Yinghai Lu 2009-11-11 43
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 44 printk(KERN_DEBUG "PCI: root bus %02x: hardware-probed resources\n",
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 45 bus);
67f241f4579651 Yinghai Lu 2009-11-11 46
a10bb128b64fe0 Yinghai Lu 2012-05-17 47 /* already added by acpi ? */
14d76b68f2819a Jiang Liu 2015-02-05 48 resource_list_for_each_entry(window, resources)
a10bb128b64fe0 Yinghai Lu 2012-05-17 49 if (window->res->flags & IORESOURCE_BUS) {
a10bb128b64fe0 Yinghai Lu 2012-05-17 50 found = true;
a10bb128b64fe0 Yinghai Lu 2012-05-17 51 break;
a10bb128b64fe0 Yinghai Lu 2012-05-17 52 }
a10bb128b64fe0 Yinghai Lu 2012-05-17 53
a10bb128b64fe0 Yinghai Lu 2012-05-17 54 if (!found)
a10bb128b64fe0 Yinghai Lu 2012-05-17 55 pci_add_resource(resources, &info->busn);
a10bb128b64fe0 Yinghai Lu 2012-05-17 56
727ae8be30b428 Liu Jiang 2015-11-27 57 list_for_each_entry(root_res, &info->resources, list)
727ae8be30b428 Liu Jiang 2015-11-27 58 pci_add_resource(resources, &root_res->res);
727ae8be30b428 Liu Jiang 2015-11-27 59
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 60 return;
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 61
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 62 default_resources:
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 63 /*
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 64 * We don't have any host bridge aperture information from the
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 65 * "native host bridge drivers," e.g., amd_bus or broadcom_bus,
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 66 * so fall back to the defaults historically used by pci_create_bus().
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 67 */
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 68 printk(KERN_DEBUG "PCI: root bus %02x: using default resources\n", bus);
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 69 pci_add_resource(resources, &ioport_resource);
2cd6975a4ff92a Bjorn Helgaas 2011-10-28 70 pci_add_resource(resources, &iomem_resource);
67f241f4579651 Yinghai Lu 2009-11-11 71 }
67f241f4579651 Yinghai Lu 2009-11-11 72
:::::: The code at line 24 was first introduced by commit
:::::: afcf21c2beca6604dbdc24fed1624c2499a85e7d x86/PCI: Add x86_pci_root_bus_node() to look up NUMA node from PCI bus
:::::: TO: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
:::::: CC: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx