On Thu, Jul 17, 2025 at 02:59:26PM GMT, kernel test robot wrote: > Hi Manivannan, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on 19272b37aa4f83ca52bdf9c16d5d81bdd1354494] > > url: > https://github.com/intel-lab-lkp/linux/commits/Manivannan-Sadhasivam-via-B4-Relay/PCI-ASPM-Fix-the-behavior-of-pci_enable_link_state-APIs/20250716-205857 > base: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494 > patch link: > https://lore.kernel.org/r/20250716-ath-aspm-fix-v1-4-dd3e62c1b692%40oss.qualcomm.com > patch subject: [PATCH 4/6] wifi: ath12k: Use > pci_{enable/disable}_link_state() APIs to enable/disable ASPM states > config: m68k-allmodconfig > (https://download.01.org/0day-ci/archive/20250717/202507171411.xoxuslas-...@intel.com/config) > compiler: m68k-linux-gcc (GCC) 15.1.0 > reproduce (this is a W=1 build): > (https://download.01.org/0day-ci/archive/20250717/202507171411.xoxuslas-...@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 <l...@intel.com> > | Closes: > https://lore.kernel.org/oe-kbuild-all/202507171411.xoxuslas-...@intel.com/ > > All errors (new ones prefixed by >>): > > In file included from drivers/net/wireless/ath/main.c:22: > drivers/net/wireless/ath/ath.h: In function 'ath_pci_aspm_state': > >> drivers/net/wireless/ath/ath.h:346:26: error: 'PCIE_LINK_STATE_L0S' > >> undeclared (first use in this function) > 346 | state |= PCIE_LINK_STATE_L0S; > | ^~~~~~~~~~~~~~~~~~~
Ok, this is an issue in the PCI header. The CONFIG_PCI symbol wraps the ASPM definitions also. In this config, CONFIG_PCI is unset, so it triggered the undeclared definition error. I will add a patch to move all definitions out of the CONFIG_PCI guard. It is supposed to wrap only the function definitions/declarations. - Mani > drivers/net/wireless/ath/ath.h:346:26: note: each undeclared identifier is > reported only once for each function it appears in > >> drivers/net/wireless/ath/ath.h:348:26: error: 'PCIE_LINK_STATE_L1' > >> undeclared (first use in this function) > 348 | state |= PCIE_LINK_STATE_L1; > | ^~~~~~~~~~~~~~~~~~ > -- > In file included from drivers/net/wireless/ath/ath9k/common.h:19, > from drivers/net/wireless/ath/ath9k/ath9k.h:29, > from drivers/net/wireless/ath/ath9k/beacon.c:18: > drivers/net/wireless/ath/ath9k/../ath.h: In function 'ath_pci_aspm_state': > >> drivers/net/wireless/ath/ath9k/../ath.h:346:26: error: > >> 'PCIE_LINK_STATE_L0S' undeclared (first use in this function) > 346 | state |= PCIE_LINK_STATE_L0S; > | ^~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/ath9k/../ath.h:346:26: note: each undeclared > identifier is reported only once for each function it appears in > >> drivers/net/wireless/ath/ath9k/../ath.h:348:26: error: > >> 'PCIE_LINK_STATE_L1' undeclared (first use in this function) > 348 | state |= PCIE_LINK_STATE_L1; > | ^~~~~~~~~~~~~~~~~~ > -- > In file included from drivers/net/wireless/ath/carl9170/../regd.h:23, > from drivers/net/wireless/ath/carl9170/carl9170.h:61, > from drivers/net/wireless/ath/carl9170/main.c:47: > drivers/net/wireless/ath/carl9170/../ath.h: In function > 'ath_pci_aspm_state': > >> drivers/net/wireless/ath/carl9170/../ath.h:346:26: error: > >> 'PCIE_LINK_STATE_L0S' undeclared (first use in this function) > 346 | state |= PCIE_LINK_STATE_L0S; > | ^~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/carl9170/../ath.h:346:26: note: each undeclared > identifier is reported only once for each function it appears in > >> drivers/net/wireless/ath/carl9170/../ath.h:348:26: error: > >> 'PCIE_LINK_STATE_L1' undeclared (first use in this function) > 348 | state |= PCIE_LINK_STATE_L1; > | ^~~~~~~~~~~~~~~~~~ > -- > In file included from drivers/net/wireless/ath/ath6kl/../regd.h:23, > from drivers/net/wireless/ath/ath6kl/wmi.c:24: > drivers/net/wireless/ath/ath6kl/../ath.h: In function 'ath_pci_aspm_state': > >> drivers/net/wireless/ath/ath6kl/../ath.h:346:26: error: > >> 'PCIE_LINK_STATE_L0S' undeclared (first use in this function) > 346 | state |= PCIE_LINK_STATE_L0S; > | ^~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/ath6kl/../ath.h:346:26: note: each undeclared > identifier is reported only once for each function it appears in > >> drivers/net/wireless/ath/ath6kl/../ath.h:348:26: error: > >> 'PCIE_LINK_STATE_L1' undeclared (first use in this function) > 348 | state |= PCIE_LINK_STATE_L1; > | ^~~~~~~~~~~~~~~~~~ > -- > In file included from drivers/net/wireless/ath/ath10k/core.h:25, > from drivers/net/wireless/ath/ath10k/mac.h:11, > from drivers/net/wireless/ath/ath10k/mac.c:9: > drivers/net/wireless/ath/ath10k/../ath.h: In function 'ath_pci_aspm_state': > >> drivers/net/wireless/ath/ath10k/../ath.h:346:26: error: > >> 'PCIE_LINK_STATE_L0S' undeclared (first use in this function) > 346 | state |= PCIE_LINK_STATE_L0S; > | ^~~~~~~~~~~~~~~~~~~ > drivers/net/wireless/ath/ath10k/../ath.h:346:26: note: each undeclared > identifier is reported only once for each function it appears in > >> drivers/net/wireless/ath/ath10k/../ath.h:348:26: error: > >> 'PCIE_LINK_STATE_L1' undeclared (first use in this function) > 348 | state |= PCIE_LINK_STATE_L1; > | ^~~~~~~~~~~~~~~~~~ > > > vim +/PCIE_LINK_STATE_L0S +346 drivers/net/wireless/ath/ath.h > > 340 > 341 static inline int ath_pci_aspm_state(u16 lnkctl) > 342 { > 343 int state = 0; > 344 > 345 if (lnkctl & PCI_EXP_LNKCTL_ASPM_L0S) > > 346 state |= PCIE_LINK_STATE_L0S; > 347 if (lnkctl & PCI_EXP_LNKCTL_ASPM_L1) > > 348 state |= PCIE_LINK_STATE_L1; > 349 > 350 return state; > 351 } > 352 > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests/wiki -- மணிவண்ணன் சதாசிவம்