Hi Hans, kernel test robot noticed the following build errors: [auto build test ERROR on ca91b9500108d4cf083a635c2e11c884d5dd20ea] url: https://github.com/intel-lab-lkp/linux/commits/Hans-Zhang/PCI-Introduce-generic-bus-config-read-helper-function/20250506-004221 base: ca91b9500108d4cf083a635c2e11c884d5dd20ea patch link: https://lore.kernel.org/r/20250505163420.198012-6-18255117159%40163.com patch subject: [PATCH v11 5/6] PCI: cadence: Use common PCI host bridge APIs for finding the capabilities config: csky-randconfig-001-20250513 (https://download.01.org/0day-ci/archive/20250513/202505131520.uEv4I92o-lkp@xxxxxxxxx/config) compiler: csky-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250513/202505131520.uEv4I92o-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/202505131520.uEv4I92o-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from drivers/pci/controller/cadence/pcie-cadence.c:10: drivers/pci/controller/cadence/pcie-cadence.c: In function 'cdns_pcie_find_capability': >> drivers/pci/controller/cadence/../../pci.h:125:24: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration] 125 | __id = FIELD_GET(PCI_CAP_ID_MASK, __ent); \ | ^~~~~~~~~ drivers/pci/controller/cadence/pcie-cadence.c:28:16: note: in expansion of macro 'PCI_FIND_NEXT_CAP_TTL' 28 | return PCI_FIND_NEXT_CAP_TTL(cdns_pcie_read_cfg, PCI_CAPABILITY_LIST, | ^~~~~~~~~~~~~~~~~~~~~ vim +/FIELD_GET +125 drivers/pci/controller/cadence/../../pci.h 343e51ae6e3f64 Jacob Keller 2013-07-31 88 7a1562d4f2d017 Yinghai Lu 2014-11-11 89 bool pcie_cap_has_lnkctl(const struct pci_dev *dev); 503fa23614dc95 Maciej W. Rozycki 2022-09-17 90 bool pcie_cap_has_lnkctl2(const struct pci_dev *dev); af65d1ad416bc6 Patel, Mayurkumar 2019-10-18 91 bool pcie_cap_has_rtctl(const struct pci_dev *dev); 5f06abead7cb8c Hans Zhang 2025-05-06 92 int pci_bus_read_config(void *priv, unsigned int devfn, int where, u32 size, 5f06abead7cb8c Hans Zhang 2025-05-06 93 u32 *val); 7a1562d4f2d017 Yinghai Lu 2014-11-11 94 db69afa296b68c Hans Zhang 2025-05-06 95 /* Standard Capability finder */ db69afa296b68c Hans Zhang 2025-05-06 96 /** db69afa296b68c Hans Zhang 2025-05-06 97 * PCI_FIND_NEXT_CAP_TTL - Find a PCI standard capability db69afa296b68c Hans Zhang 2025-05-06 98 * @read_cfg: Function pointer for reading PCI config space db69afa296b68c Hans Zhang 2025-05-06 99 * @start: Starting position to begin search db69afa296b68c Hans Zhang 2025-05-06 100 * @cap: Capability ID to find db69afa296b68c Hans Zhang 2025-05-06 101 * @args: Arguments to pass to read_cfg function db69afa296b68c Hans Zhang 2025-05-06 102 * db69afa296b68c Hans Zhang 2025-05-06 103 * Iterates through the capability list in PCI config space to find db69afa296b68c Hans Zhang 2025-05-06 104 * the specified capability. Implements TTL (time-to-live) protection db69afa296b68c Hans Zhang 2025-05-06 105 * against infinite loops. db69afa296b68c Hans Zhang 2025-05-06 106 * db69afa296b68c Hans Zhang 2025-05-06 107 * Returns: Position of the capability if found, 0 otherwise. db69afa296b68c Hans Zhang 2025-05-06 108 */ db69afa296b68c Hans Zhang 2025-05-06 109 #define PCI_FIND_NEXT_CAP_TTL(read_cfg, start, cap, args...) \ db69afa296b68c Hans Zhang 2025-05-06 110 ({ \ db69afa296b68c Hans Zhang 2025-05-06 111 int __ttl = PCI_FIND_CAP_TTL; \ db69afa296b68c Hans Zhang 2025-05-06 112 u8 __id, __found_pos = 0; \ db69afa296b68c Hans Zhang 2025-05-06 113 u8 __pos = (start); \ db69afa296b68c Hans Zhang 2025-05-06 114 u16 __ent; \ db69afa296b68c Hans Zhang 2025-05-06 115 \ db69afa296b68c Hans Zhang 2025-05-06 116 read_cfg(args, __pos, 1, (u32 *)&__pos); \ db69afa296b68c Hans Zhang 2025-05-06 117 \ db69afa296b68c Hans Zhang 2025-05-06 118 while (__ttl--) { \ db69afa296b68c Hans Zhang 2025-05-06 119 if (__pos < PCI_STD_HEADER_SIZEOF) \ db69afa296b68c Hans Zhang 2025-05-06 120 break; \ db69afa296b68c Hans Zhang 2025-05-06 121 \ db69afa296b68c Hans Zhang 2025-05-06 122 __pos = ALIGN_DOWN(__pos, 4); \ db69afa296b68c Hans Zhang 2025-05-06 123 read_cfg(args, __pos, 2, (u32 *)&__ent); \ db69afa296b68c Hans Zhang 2025-05-06 124 \ db69afa296b68c Hans Zhang 2025-05-06 @125 __id = FIELD_GET(PCI_CAP_ID_MASK, __ent); \ db69afa296b68c Hans Zhang 2025-05-06 126 if (__id == 0xff) \ db69afa296b68c Hans Zhang 2025-05-06 127 break; \ db69afa296b68c Hans Zhang 2025-05-06 128 \ db69afa296b68c Hans Zhang 2025-05-06 129 if (__id == (cap)) { \ db69afa296b68c Hans Zhang 2025-05-06 130 __found_pos = __pos; \ db69afa296b68c Hans Zhang 2025-05-06 131 break; \ db69afa296b68c Hans Zhang 2025-05-06 132 } \ db69afa296b68c Hans Zhang 2025-05-06 133 \ db69afa296b68c Hans Zhang 2025-05-06 134 __pos = FIELD_GET(PCI_CAP_LIST_NEXT_MASK, __ent); \ db69afa296b68c Hans Zhang 2025-05-06 135 } \ db69afa296b68c Hans Zhang 2025-05-06 136 __found_pos; \ db69afa296b68c Hans Zhang 2025-05-06 137 }) db69afa296b68c Hans Zhang 2025-05-06 138 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki