Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5917118rwb; Mon, 14 Nov 2022 11:19:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf7vKcucKl9OC7Oag+oA/D6uqGuzJItVGdxleKvXRO8pJGEx9Nry+4JumvB+hFh1LEqtWDPm X-Received: by 2002:a17:906:a015:b0:7ad:b868:f096 with SMTP id p21-20020a170906a01500b007adb868f096mr11045863ejy.295.1668453546113; Mon, 14 Nov 2022 11:19:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668453546; cv=none; d=google.com; s=arc-20160816; b=DoR45QWKrWbcPxEMPOzkdR42bNdUQ0hAa87Yh792ndiCxh2TggC0JVeRf+ZYkKa3T9 dlYhoUzcZf+cV7qoOF4XZLik5nhxE8gm1GH3UFQN9KHCtqGEKQy/VzdJWgxory2z0F9F 3zE5PeI+D5FUxcDtr1UT4KsphsgBwG3hacxO4RhtwrbTBTYlNGKCClqSW45VWGR6qb7J nfJsLpRzfOoi+MXuCihskjKM1D2FLQU7M91Bave4joPLDtQsN9DbuUTe1mUphbUIrTi/ eW4FNkOZG+ZPOSRvTJ4Y4kmfW0reoPjfavKijf17QWg4+Oa1a2WiZPYc/6YTHMwzf98v qq3w== 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=GCyVbnMgQ32CjaFEGqKy+9AKdMzZIqgPrXLGxULE1J4=; b=oUA/YMU/iO/vbYR8vg0s7fuIYY8gJcm9ZYQr1PgstriuGOZTTQBcclaOAplFLS2qzj kBrTis6XH0mDQL73iGlO10vo3aAdnm+NtRhAGfk/L8XJyEwudKV3D0v9RCDvyAA6Iq5m 5yvb8zvaSJ+h8SMxaLM8WTpDlTXZImhcKAHRFM/iU/ygdjZYrwenJMXtZjPieM+pM9oE 7gniF9RnwTtjGuEAqwQfoC6HEaqKJdkn+evGKhtOa1Nedxv3iqu3SLz57HtCxheb6maI gJAzcOLQ64gxZ9x6TT/cOH2YxGTbAAY45Jm0MJjyLXjvOI9iLKtfdGiXVL6ZEs7x3+ac oV+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=i3uF8urp; 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 bt15-20020a0564020a4f00b004623028c586si7804655edb.141.2022.11.14.11.18.44; Mon, 14 Nov 2022 11:19:06 -0800 (PST) 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=i3uF8urp; 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 S236784AbiKNS6b (ORCPT + 88 others); Mon, 14 Nov 2022 13:58:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235836AbiKNS6L (ORCPT ); Mon, 14 Nov 2022 13:58:11 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3816F1D33D; Mon, 14 Nov 2022 10:58:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668452290; x=1699988290; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=x6ggnXnghcO12tbT4wtQfhiqCsVpusNaj/2IGyQVVxI=; b=i3uF8urp3pCu/Df8JGxRDJ/iY/G6MQwQDC0b2ezYdPXiSn/faE7m3dE/ 7UlImdTQyyY9dtNs1UxJ+0iGkc3ntR2KDgJvWZvpF1Y0YsVnUzyLsWy3H RMrGMyiYAoJMG6H1eXy2jLO+49h3I5aw9bRAd5xINCcQ6c/j7bPZEH1mh RRXhXAIzA2PnMXDPAjieUhgzyrpbAGwrPDVQ+sghzgMYOGOv8MqJVu4Ym mgDvhoIttGDlYwvUVaR9hYRNYS8gzh7PYMPXn6XtszEKQT+jz+k4gisSd el7iJT2+jocapLWGSWzQwx4GHfTB8xxUTfZZkUvsS+Y+r7oq/ww3V4Hxe A==; X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="338843412" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="338843412" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 10:58:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="638607285" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="638607285" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 14 Nov 2022 10:58:00 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id BAA212F3; Mon, 14 Nov 2022 20:58:24 +0200 (EET) From: Andy Shevchenko To: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Mika Westerberg , Andy Shevchenko , Michael Ellerman , Arnd Bergmann , Bjorn Helgaas , "Rafael J. Wysocki" , =?UTF-8?q?Pali=20Roh=C3=A1r?= , 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 v3 0/4] PCI: Add pci_dev_for_each_resource() helper and Date: Mon, 14 Nov 2022 20:58:18 +0200 Message-Id: <20221114185822.65038-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=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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/r/20221114115953.40236-1-mika.westerberg@linux.intel.com Changelog v3: - rebased on top of v2 by Mika, see above - added tag to pcmcia patch (Dominik) 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