From: kernel test robot <lkp@intel.com>
To: Hans Zhang <18255117159@163.com>,
lpieralisi@kernel.org, bhelgaas@google.com,
manivannan.sadhasivam@linaro.org, ilpo.jarvinen@linux.intel.com,
kw@linux.com
Cc: oe-kbuild-all@lists.linux.dev, cassel@kernel.org,
robh@kernel.org, jingoohan1@gmail.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, Hans Zhang <18255117159@163.com>
Subject: Re: [PATCH v11 5/6] PCI: cadence: Use common PCI host bridge APIs for finding the capabilities
Date: Tue, 13 May 2025 16:06:21 +0800 [thread overview]
Message-ID: <202505131520.uEv4I92o-lkp@intel.com> (raw)
In-Reply-To: <20250505163420.198012-6-18255117159@163.com>
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@intel.com/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@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/202505131520.uEv4I92o-lkp@intel.com/
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
next prev parent reply other threads:[~2025-05-13 8:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 16:34 [PATCH v11 0/6] Refactor capability search into common macros Hans Zhang
2025-05-05 16:34 ` [PATCH v11 1/6] PCI: Introduce generic bus config read helper function Hans Zhang
2025-05-05 16:34 ` [PATCH v11 2/6] PCI: Clean up __pci_find_next_cap_ttl() readability Hans Zhang
2025-05-05 16:34 ` [PATCH v11 3/6] PCI: Refactor capability search into common macros Hans Zhang
2025-05-05 16:34 ` [PATCH v11 4/6] PCI: dwc: Use common PCI host bridge APIs for finding the capabilities Hans Zhang
2025-05-09 12:49 ` kernel test robot
2025-05-09 16:57 ` Hans Zhang
2025-05-05 16:34 ` [PATCH v11 5/6] PCI: cadence: " Hans Zhang
2025-05-13 8:06 ` kernel test robot [this message]
2025-05-05 16:34 ` [PATCH v11 6/6] PCI: cadence: Use cdns_pcie_find_*capability to avoid hardcode Hans Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202505131520.uEv4I92o-lkp@intel.com \
--to=lkp@intel.com \
--cc=18255117159@163.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jingoohan1@gmail.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox