Re: [v7 3/5] PCI: dwc: Use common PCI host bridge APIs for finding the capabilities

kernel test robot
2025-04-02T11:59:01Z

Hi Hans,

kernel test robot noticed the following build errors:

[auto build test ERROR on acb4f33713b9f6cadb6143f211714c343465411c]

url: https://github.com/intel-lab-lkp/linux/commits/Hans-Zhang/PCI-Refactor-capability-search-into-common-macros/20250402-122544
base: acb4f33713b9f6cadb6143f211714c343465411c
patch link: https://lore.kernel.org/r/20250402042020.48681-4-18255117159%40163.com
patch subject: [v7 3/5] PCI: dwc: Use common PCI host bridge APIs for finding the capabilities
config: loongarch-randconfig-001-20250402 (https://download.01.org/0day-ci/archive/20250402/202504021958.YeTPCsW1-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250402/202504021958.YeTPCsW1-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/202504021958.YeTPCsW1-lkp@intel.com/

All errors (new ones prefixed by >>):

In file included from drivers/pci/controller/dwc/pcie-designware.c:23:
drivers/pci/controller/dwc/pcie-designware.c: In function 'dw_pcie_find_capability':
>> drivers/pci/controller/dwc/pcie-designware.c:218:38: error: 'pcie' undeclared (first use in this function); did you mean 'pci'?
218 | pcie);
| ^~~~
drivers/pci/controller/dwc/../../pci.h:114:18: note: in definition of macro 'PCI_FIND_NEXT_CAP_TTL'
114 | read_cfg(args, __pos, 1, (u32 *)&__pos); \
| ^~~~
drivers/pci/controller/dwc/pcie-designware.c:218:38: note: each undeclared identifier is reported only once for each function it appears in
218 | pcie);
| ^~~~
drivers/pci/controller/dwc/../../pci.h:114:18: note: in definition of macro 'PCI_FIND_NEXT_CAP_TTL'
114 | read_cfg(args, __pos, 1, (u32 *)&__pos); \
| ^~~~
drivers/pci/controller/dwc/pcie-designware.c: In function 'dw_pcie_find_ext_capability':
drivers/pci/controller/dwc/pcie-designware.c:224:71: error: 'pcie' undeclared (first use in this function); did you mean 'pci'?
224 | return PCI_FIND_NEXT_EXT_CAPABILITY(dw_pcie_read_cfg, 0, cap, pcie);
| ^~~~
drivers/pci/controller/dwc/../../pci.h:156:34: note: in definition of macro 'PCI_FIND_NEXT_EXT_CAPABILITY'
156 | __ret = read_cfg(args, __pos, 4, &__header); \
| ^~~~

vim +218 drivers/pci/controller/dwc/pcie-designware.c

214
215 u8 dw_pcie_find_capability(struct dw_pcie *pci, u8 cap)
216 {
217 return PCI_FIND_NEXT_CAP_TTL(dw_pcie_read_cfg, PCI_CAPABILITY_LIST, cap,
> 218 pcie);
219 }
220 EXPORT_SYMBOL_GPL(dw_pcie_find_capability);
221

--
0-DAY CI Kernel Test Service