From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EBADC6FD19 for ; Fri, 10 Mar 2023 21:58:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DWcJjIxKik1uU5jJ8UUXLgKEYY7TsH4084J5hjW1ga8=; b=kY4WCxIVEC2XW1 ESN2GqhPLyfOOgX0sxM6e5SDTaUBvmv+WYjqoL6ewDPUbipelhPknf4uRf7Mfkk9M42hsD0PzyS3u m+gJxeqtmEdyqoZbMVWqjP94VDrqZxxcWEU3hcJvu2vj3ONgdRm2irI8usUyndLr6KLejUV5X4Hzo pKjeKuO4I27aCMLMZ80Z4PSpo5w6RDwrbhTwbhxcujyVu9OxywzNDdHAKRrdrukiNAUTAKZipOWUd ynGBOay95Zc6FM5UPp5SI8cQu/Fou/BD0mFGHAXPhzIwbneX5ynzLeUQ5en3Rsur7iynUspoNrYAs XZwdFOAUChPhCza+vH7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pakk5-00GHuk-Pt; Fri, 10 Mar 2023 21:57:39 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pakfW-00GG5k-RA for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 21:52:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678485174; x=1710021174; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=9ZQRLQu84HAORpFHSfVd3rSzKA87bHH+2cYOQb+pAc8=; b=kkOzjd47rMS8iLYj00O5yegiyQV4VJTBWfILYmhPz4Ena2ACIQm06DqN gXL4j+E69Aqlb2Bl/qTnJGLeDcAEdHWUngriY3NxbQNM1eaGjhKdECJ9i K0xzEG8S23PA+jKrOzrdtDcm5jBoBe5ALjxM6FvyaZrwwb+WKeP6Z+fX7 aoJoJ5A027BBnSjSl7uX0XnhpXqDWT+HFTW/2EOIxUM3/SbH6hNs8ya9E wI07jctuXQDKlQLq3BfzhrtqECD6o4Q2NF+0BKjOa/eRvr07vaB1eLwAp ThXwIsGUrn3MBtqnnHzKAsogBClemPZPQK8rLEBCwpEoyiE9CzqotwHWp g==; X-IronPort-AV: E=McAfee;i="6500,9779,10645"; a="335534013" X-IronPort-AV: E=Sophos;i="5.98,250,1673942400"; d="scan'208";a="335534013" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2023 13:52:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10645"; a="677977037" X-IronPort-AV: E=Sophos;i="5.98,250,1673942400"; d="scan'208";a="677977037" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by orsmga002.jf.intel.com with ESMTP; 10 Mar 2023 13:52:29 -0800 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1pakf7-000471-0G; Fri, 10 Mar 2023 21:52:29 +0000 Date: Sat, 11 Mar 2023 05:51:50 +0800 From: kernel test robot To: Andy Shevchenko , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Mika Westerberg , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Michael Ellerman , Randy Dunlap , Arnd Bergmann , Bjorn Helgaas , "Rafael J. Wysocki" , Niklas Schnelle , Pali =?iso-8859-1?Q?Roh=E1r?= , "Maciej W. Rozycki" , Juergen Gross , Dominik Brodowski , 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.xenproject.org, linux-acpi@vger.kernel.org Cc: oe-kbuild-all@lists.linux.dev, Miguel Ojeda , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Andrew Lunn Subject: Re: [PATCH v4 1/4] PCI: Introduce pci_dev_for_each_resource() Message-ID: <202303110550.BLo6P5dS-lkp@intel.com> References: <20230310171416.23356-2-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230310171416.23356-2-andriy.shevchenko@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230310_135255_053071_F4640D28 X-CRM114-Status: GOOD ( 19.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 | 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel