From: kernel test robot <lkp@intel.com>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Mickaël Salaün" <mic@digikod.net>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Bjorn Helgaas" <helgaas@kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Niklas Schnelle" <schnelle@linux.ibm.com>,
"Pali Rohár" <pali@kernel.org>,
"Maciej W. Rozycki" <macro@orcam.me.uk>,
"Juergen Gross" <jgross@suse.com>,
"Dominik Brodowski" <linux@dominikbrodowski.net>,
linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org,
sparclinux@vger.kernel.org, linux-pci@vger.kernel.org,
xen-devel@lists.xenpro
Cc: Andrew Lunn <andrew@lunn.ch>,
Richard Henderson <richard.henderson@linaro.org>,
Russell King <linux@armlinux.org.uk>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
oe-kbuild-all@lists.linux.dev, Miguel Ojeda <ojeda@kernel.org>,
Matt Turner <mattst88@gmail.com>
Subject: Re: [PATCH v4 1/4] PCI: Introduce pci_dev_for_each_resource()
Date: Sat, 11 Mar 2023 05:51:50 +0800 [thread overview]
Message-ID: <202303110550.BLo6P5dS-lkp@intel.com> (raw)
In-Reply-To: <20230310171416.23356-2-andriy.shevchenko@linux.intel.com>
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on pci/next]
[also build test ERROR on pci/for-linus powerpc/next powerpc/fixes linus/master v6.3-rc1 next-20230310]
[cannot apply to soc/for-next]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/PCI-Introduce-pci_dev_for_each_resource/20230311-011642
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20230310171416.23356-2-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v4 1/4] PCI: Introduce pci_dev_for_each_resource()
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230311/202303110550.BLo6P5dS-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/059b4a086017fbf2baacdbe0cc454f569f618ffd
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/PCI-Introduce-pci_dev_for_each_resource/20230311-011642
git checkout 059b4a086017fbf2baacdbe0cc454f569f618ffd
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303110550.BLo6P5dS-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/pnp/quirks.c: In function 'quirk_system_pci_resources':
>> drivers/pnp/quirks.c:245:17: error: implicit declaration of function 'pci_dev_for_each_resource' [-Werror=implicit-function-declaration]
245 | pci_dev_for_each_resource(pdev, r, i) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pnp/quirks.c:245:54: error: expected ';' before '{' token
245 | pci_dev_for_each_resource(pdev, r, i) {
| ^~
| ;
drivers/pnp/quirks.c:233:16: warning: unused variable 'j' [-Wunused-variable]
233 | int i, j;
| ^
drivers/pnp/quirks.c:232:26: warning: unused variable 'res' [-Wunused-variable]
232 | struct resource *res, *r;
| ^~~
cc1: some warnings being treated as errors
vim +/pci_dev_for_each_resource +245 drivers/pnp/quirks.c
228
229 static void quirk_system_pci_resources(struct pnp_dev *dev)
230 {
231 struct pci_dev *pdev = NULL;
232 struct resource *res, *r;
233 int i, j;
234
235 /*
236 * Some BIOSes have PNP motherboard devices with resources that
237 * partially overlap PCI BARs. The PNP system driver claims these
238 * motherboard resources, which prevents the normal PCI driver from
239 * requesting them later.
240 *
241 * This patch disables the PNP resources that conflict with PCI BARs
242 * so they won't be claimed by the PNP system driver.
243 */
244 for_each_pci_dev(pdev) {
> 245 pci_dev_for_each_resource(pdev, r, i) {
246 unsigned long type = resource_type(r);
247
248 if (type != IORESOURCE_IO || type != IORESOURCE_MEM ||
249 resource_size(r) == 0)
250 continue;
251
252 if (r->flags & IORESOURCE_UNSET)
253 continue;
254
255 for (j = 0;
256 (res = pnp_get_resource(dev, type, j)); j++) {
257 if (res->start == 0 && res->end == 0)
258 continue;
259
260 /*
261 * If the PNP region doesn't overlap the PCI
262 * region at all, there's no problem.
263 */
264 if (!resource_overlaps(res, r))
265 continue;
266
267 /*
268 * If the PNP region completely encloses (or is
269 * at least as large as) the PCI region, that's
270 * also OK. For example, this happens when the
271 * PNP device describes a bridge with PCI
272 * behind it.
273 */
274 if (res->start <= r->start && res->end >= r->end)
275 continue;
276
277 /*
278 * Otherwise, the PNP region overlaps *part* of
279 * the PCI region, and that might prevent a PCI
280 * driver from requesting its resources.
281 */
282 dev_warn(&dev->dev,
283 "disabling %pR because it overlaps %s BAR %d %pR\n",
284 res, pci_name(pdev), i, r);
285 res->flags |= IORESOURCE_DISABLED;
286 }
287 }
288 }
289 }
290
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-03-10 21:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 17:14 [PATCH v4 0/4] PCI: Add pci_dev_for_each_resource() helper and update users Andy Shevchenko
2023-03-10 17:14 ` [PATCH v4 1/4] PCI: Introduce pci_dev_for_each_resource() Andy Shevchenko
2023-03-10 21:51 ` kernel test robot [this message]
2023-03-10 22:15 ` Keith Busch
2023-03-14 18:39 ` Andy Shevchenko
2023-03-11 13:54 ` Dan Carpenter
2023-03-14 18:43 ` Andy Shevchenko
2023-03-10 17:14 ` [PATCH v4 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource() Andy Shevchenko
2023-03-10 17:14 ` [PATCH v4 3/4] EISA: Convert to use pci_bus_for_each_resource_p() Andy Shevchenko
2023-03-10 17:14 ` [PATCH v4 4/4] pcmcia: " Andy Shevchenko
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=202303110550.BLo6P5dS-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew@lunn.ch \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=helgaas@kernel.org \
--cc=ink@jurassic.park.msu.ru \
--cc=jgross@suse.com \
--cc=kw@linux.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@dominikbrodowski.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=macro@orcam.me.uk \
--cc=mattst88@gmail.com \
--cc=mic@digikod.net \
--cc=mika.westerberg@linux.intel.com \
--cc=mpe@ellerman.id.au \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=pali@kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rdunlap@infradead.org \
--cc=richard.henderson@linaro.org \
--cc=schnelle@linux.ibm.com \
--cc=sparclinux@vger.kernel.org \
--cc=xen-devel@lists.xenpro \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).