Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1880963rwi; Thu, 3 Nov 2022 10:04:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7MR6GRd/AgPVZaeKZGxAJPRakjQghHPCDLT2E0FcusSNDS1h5SBeotirPoaRfmtTAepbcJ X-Received: by 2002:a17:907:aa1:b0:7ad:b286:fa25 with SMTP id bz1-20020a1709070aa100b007adb286fa25mr29672479ejc.106.1667495086783; Thu, 03 Nov 2022 10:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667495086; cv=none; d=google.com; s=arc-20160816; b=OZs66yPkwhxGszTbJjiF97AA67xbWOQmPe6jv1XGmTQjvT9cryblOV5dNGHEBPvxhM FYtFiJwZTpBEwNWrYiqDlAsl85rHjFZRhyCSqyj+cTtJIBfyJjCqp3HqDUhLpwZbmdp/ 7I/JYHeSRhTKx9AyMzd3hJPFJ6uCIbgLTFhtFG2dtbADW7TgLyCPU4iFjNCUdi8GbgrY 3jQW4RlAOp1driW6TSpcoQ+lNYBi+Sp5+z5PZuAZfm6Cf6qYV9R6VxS2Rdr/OHV38AHW AU53apC7g6pSgkYRACqJ56GsASLmAYPsIJWpgjzoYUl4tmguBkujl/YAuE56SuaBZrlv jxEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3nzqw30QNDyp6KAIxya88mgNfoRltjthJsCkQc7uVIw=; b=JHvICajVSfasEah21wYXiHFtS2bhbT17vfzUDLrJTXD8ldhXeQrl2wzx+ylPJIgvI3 X6b2nTDszdj9AkxzvDgv77h53gOOljZ0EvB9vSAPEvwzvXwgyL73gxJYynk7pO7OvQ0q OhaQZ3LaYLzCn58wXrFHmYa01jRr5g5l11SuCZf3wmd6+Vg0nCHaHEmc8HYfiI9VC3Nc K4IEicoVyPXUeu84VFgwdJ61MpizE+5LrKZH/n41qEtpHyFm7w4UTvAbhPiQRnWKvo8W jT7kxt+gQAnqZuxJrm/mXYix8zSaDaYujOp7539DLKffse5+wHXfvmj6cwFItrtClAvb JSyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FSAajs9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ko2-20020a170907986200b0078de83a052csi1658736ejc.483.2022.11.03.10.04.12; Thu, 03 Nov 2022 10:04:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FSAajs9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232180AbiKCQrk (ORCPT + 97 others); Thu, 3 Nov 2022 12:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232529AbiKCQrK (ORCPT ); Thu, 3 Nov 2022 12:47:10 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB0819C2C; Thu, 3 Nov 2022 09:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667493997; x=1699029997; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=6sEwb2LvPX9v9prH3mu2nEGi0LVqQc1+Me9tIfh9Gsk=; b=FSAajs9mYEpAxwK1E+Kao7vQC/qmjWPLx+u/6kzAraWx6TeMe8tnDsLB g9o+1xrusrovOrcx7ToF5XANKPmAHc/1ZQ+Ms9pYKXlY+/x8i1zyEmYaw G6WRv0n8FJ8b/fnKRrCandQ+ULlB/HwEaHm2mUmnrpPE/TC6oj35Fgf/v YqCcJc/1s2ZszfDUGLDVGl4ufvcn06A7YJlj7sljN5Bv9w5nDhTXE1XCv JG13K+P6z4q27Bci4Ks+ohpmCH2umHYgK1Jsgf0E2lATSPvhpxc3l+EX/ 43+4a2eyGaxbbNxnksIZ8k/cbnCJJAXSoAKXimAsXFLNOov1GqpkbJHHk Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="373970810" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="373970810" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 09:46:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="629408020" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="629408020" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 03 Nov 2022 09:46:29 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 858A5F7; Thu, 3 Nov 2022 18:46:52 +0200 (EET) From: Andy Shevchenko To: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Andy Shevchenko , Mika Westerberg , Michael Ellerman , Arnd Bergmann , Bjorn Helgaas , "Rafael J. Wysocki" , 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, sparclinux@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org Cc: Miguel Ojeda , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Thomas Bogendoerfer , Nicholas Piggin , Christophe Leroy , "David S. Miller" , Bjorn Helgaas , Stefano Stabellini , Oleksandr Tyshchenko Subject: [PATCH v2 0/4] PCI: Add pci_dev_for_each_resource() helper and refactor bus one Date: Thu, 3 Nov 2022 18:46:40 +0200 Message-Id: <20221103164644.70554-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Provide two new helper macros to iterate over PCI device resources and convert users. Looking at it, refactor existing pci_bus_for_each_resource() and convert users accordingly. This applies on top of this patch Mika sent out earlier: https://lore.kernel.org/linux-pci/20221103103254.30497-1-mika.westerberg@linux.intel.com/ Changelog v2: - refactor to have two macros - refactor existing pci_bus_for_each_resource() in the same way and convert users Andy Shevchenko (3): PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource() EISA: Convert to use pci_bus_for_each_resource_p() pcmcia: Convert to use pci_bus_for_each_resource_p() Mika Westerberg (1): PCI: Introduce pci_dev_for_each_resource() .clang-format | 3 +++ arch/alpha/kernel/pci.c | 5 ++--- arch/arm/kernel/bios32.c | 16 ++++++------- arch/mips/pci/pci-legacy.c | 3 +-- arch/powerpc/kernel/pci-common.c | 5 ++--- arch/sparc/kernel/leon_pci.c | 5 ++--- arch/sparc/kernel/pci.c | 10 ++++----- arch/sparc/kernel/pcic.c | 5 ++--- drivers/eisa/pci_eisa.c | 4 ++-- drivers/pci/bus.c | 7 +++--- drivers/pci/hotplug/shpchp_sysfs.c | 8 +++---- drivers/pci/pci.c | 5 ++--- drivers/pci/probe.c | 2 +- drivers/pci/remove.c | 5 ++--- drivers/pci/setup-bus.c | 36 ++++++++++++------------------ drivers/pci/setup-res.c | 4 +--- drivers/pci/xen-pcifront.c | 4 +--- drivers/pcmcia/rsrc_nonstatic.c | 9 +++----- drivers/pcmcia/yenta_socket.c | 3 +-- include/linux/pci.h | 25 +++++++++++++++++---- 20 files changed, 78 insertions(+), 86 deletions(-) -- 2.35.1