Re: [PATCH] PCI: Try to find two continuous regions for child resource

From: kernel test robot
Date: Mon Mar 29 2021 - 12:57:46 EST


Hi Kai-Heng,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pci/next]
[also build test ERROR on powerpc/next sparc/master linus/master sparc-next/master v5.12-rc5]
[cannot apply to next-20210329]
[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]

url: https://github.com/0day-ci/linux/commits/Kai-Heng-Feng/PCI-Try-to-find-two-continuous-regions-for-child-resource/20210329-165155
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: microblaze-randconfig-p001-20210329 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/94d03d680678c966738f767c5fb91305a3af5c9d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kai-Heng-Feng/PCI-Try-to-find-two-continuous-regions-for-child-resource/20210329-165155
git checkout 94d03d680678c966738f767c5fb91305a3af5c9d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

arch/microblaze/pci/pci-common.c: In function 'alloc_resource':
>> arch/microblaze/pci/pci-common.c:749:7: error: too few arguments to function 'pci_find_parent_resource'
749 | pr = pci_find_parent_resource(dev, r);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/microblaze/pci/pci-common.c:16:
include/linux/pci.h:1052:6: note: declared here
1052 | void pci_find_parent_resource(const struct pci_dev *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/pci_find_parent_resource +749 arch/microblaze/pci/pci-common.c

d3afa58c20b651 Michal Simek 2010-01-18 738
b881bc469bdbdc Greg Kroah-Hartman 2012-12-21 739 static inline void alloc_resource(struct pci_dev *dev, int idx)
d3afa58c20b651 Michal Simek 2010-01-18 740 {
d3afa58c20b651 Michal Simek 2010-01-18 741 struct resource *pr, *r = &dev->resource[idx];
d3afa58c20b651 Michal Simek 2010-01-18 742
d3afa58c20b651 Michal Simek 2010-01-18 743 pr_debug("PCI: Allocating %s: Resource %d: %016llx..%016llx [%x]\n",
d3afa58c20b651 Michal Simek 2010-01-18 744 pci_name(dev), idx,
d3afa58c20b651 Michal Simek 2010-01-18 745 (unsigned long long)r->start,
d3afa58c20b651 Michal Simek 2010-01-18 746 (unsigned long long)r->end,
d3afa58c20b651 Michal Simek 2010-01-18 747 (unsigned int)r->flags);
d3afa58c20b651 Michal Simek 2010-01-18 748
d3afa58c20b651 Michal Simek 2010-01-18 @749 pr = pci_find_parent_resource(dev, r);
d3afa58c20b651 Michal Simek 2010-01-18 750 if (!pr || (pr->flags & IORESOURCE_UNSET) ||
d3afa58c20b651 Michal Simek 2010-01-18 751 request_resource(pr, r) < 0) {
6bd55f0bbaebb7 Michal Simek 2012-12-27 752 pr_warn("PCI: Cannot allocate resource region %d ", idx);
6bd55f0bbaebb7 Michal Simek 2012-12-27 753 pr_cont("of device %s, will remap\n", pci_name(dev));
d3afa58c20b651 Michal Simek 2010-01-18 754 if (pr)
d3afa58c20b651 Michal Simek 2010-01-18 755 pr_debug("PCI: parent is %p: %016llx-%016llx [%x]\n",
d3afa58c20b651 Michal Simek 2010-01-18 756 pr,
d3afa58c20b651 Michal Simek 2010-01-18 757 (unsigned long long)pr->start,
d3afa58c20b651 Michal Simek 2010-01-18 758 (unsigned long long)pr->end,
d3afa58c20b651 Michal Simek 2010-01-18 759 (unsigned int)pr->flags);
d3afa58c20b651 Michal Simek 2010-01-18 760 /* We'll assign a new address later */
d3afa58c20b651 Michal Simek 2010-01-18 761 r->flags |= IORESOURCE_UNSET;
d3afa58c20b651 Michal Simek 2010-01-18 762 r->end -= r->start;
d3afa58c20b651 Michal Simek 2010-01-18 763 r->start = 0;
d3afa58c20b651 Michal Simek 2010-01-18 764 }
d3afa58c20b651 Michal Simek 2010-01-18 765 }
d3afa58c20b651 Michal Simek 2010-01-18 766

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip