From patchwork Fri Oct 13 16:53:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 10005341 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8767D60230 for ; Fri, 13 Oct 2017 16:54:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E2F328F1A for ; Fri, 13 Oct 2017 16:54:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F9F228F8E; Fri, 13 Oct 2017 16:54:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D70BA28F1A for ; Fri, 13 Oct 2017 16:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbdJMQy4 (ORCPT ); Fri, 13 Oct 2017 12:54:56 -0400 Received: from mga14.intel.com ([192.55.52.115]:42671 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441AbdJMQyz (ORCPT ); Fri, 13 Oct 2017 12:54:55 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2017 09:54:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,371,1503385200"; d="scan'208";a="1205554252" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 13 Oct 2017 09:54:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4A8B0FB; Fri, 13 Oct 2017 19:53:53 +0300 (EEST) From: Andy Shevchenko To: linux-pcmcia@lists.infradead.org, Bjorn Helgaas , linux-pci@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1] pcmcia: convert to use for_each_pci_bridge() helper Date: Fri, 13 Oct 2017 19:53:52 +0300 Message-Id: <20171013165352.25550-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.14.2 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ...which makes code slightly cleaner. Requires: d43f59ce6c50 ("PCI: Add for_each_pci_bridge() helper") Signed-off-by: Andy Shevchenko --- drivers/pcmcia/cardbus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index 4fe4cc4ae19a..5c0170597037 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c @@ -77,9 +77,8 @@ int __ref cb_alloc(struct pcmcia_socket *s) max = bus->busn_res.start; for (pass = 0; pass < 2; pass++) - list_for_each_entry(dev, &bus->devices, bus_list) - if (pci_is_bridge(dev)) - max = pci_scan_bridge(bus, dev, max, pass); + for_each_pci_bridge(dev, bus) + max = pci_scan_bridge(bus, dev, max, pass); /* * Size all resources below the CardBus controller.