From patchwork Thu Aug 16 23:26:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1335391 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 8510DDFB34 for ; Thu, 16 Aug 2012 23:26:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757540Ab2HPX03 (ORCPT ); Thu, 16 Aug 2012 19:26:29 -0400 Received: from mail-we0-f202.google.com ([74.125.82.202]:65276 "EHLO mail-we0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755488Ab2HPX02 (ORCPT ); Thu, 16 Aug 2012 19:26:28 -0400 Received: by weyr1 with SMTP id r1so155204wey.1 for ; Thu, 16 Aug 2012 16:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=NgLDnMZWicyoZPJgn1hfk3peyXUhB4TrGI1vhqcNl+Q=; b=UVO4tIgMO1dLX8jk0XYV7PIdVtovUt6D49k+SPlYO9FkpP5AVf/EcfYeC+3LdlNHHr sJUoNLFdQ46HUueVDUu5Q517QSGbp7hJ69cA1NizhPE6lDFAVaj/EQ6Zx8azhv8GuweL cGAehCunobNBQnXiGq7yJUS9RwLOrV+fP5pV6aDB+hmzLgy2cH3kgOMt0IL6E3gRdp1W KeBa5C7hacz6zgzs2o/XrOY1x73O+hNNdPvOcx6lvTgIUawkFqqlOsLEFZcFdYco4GVO IMFk+pgsRpG5koDR4IK+cJV+pdomdPe4w5JYagOjy8BjfJESOMg3XgjEj51S1SchsfaG QSLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=NgLDnMZWicyoZPJgn1hfk3peyXUhB4TrGI1vhqcNl+Q=; b=P8TL//V44xB9xRi8grz1zjRDtC0Lj3fL/NtBU9/7FVMx4MTG9gGxA52NCUgWXtkCul 8i48B+cb/JevmRx+lFe65C5aZzo4V7UEa7w2btfjqqxZvvC8HoKZu4x4dP1g0ABnbKKo 7iRt7tCPbSY20Yp+UIUoAkmrChOec1oa3yiXinMtl6Nug4IphvZQsiGQJvcgxl4+QATT zWfKizgu08L4Hx+DfFtLFuXaE0dtlOvbMcEiRnKTpAkW8GYBtDHMSaFmurf1eJAA5053 UDnVx9k22YnFea70Wc9SECV+yRR6sfgVZd4uSyo7RoBtaN2gAzgS1n1o7LEaIEXBaAeT 0WUg== Received: by 10.14.218.199 with SMTP id k47mr2543212eep.5.1345159586601; Thu, 16 Aug 2012 16:26:26 -0700 (PDT) Received: by 10.14.218.199 with SMTP id k47mr2543209eep.5.1345159586548; Thu, 16 Aug 2012 16:26:26 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id 46si7714278eed.1.2012.08.16.16.26.26 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 16 Aug 2012 16:26:26 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.18.96.155]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id 5BBF05C0050; Thu, 16 Aug 2012 16:26:26 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id BD955180640; Thu, 16 Aug 2012 16:26:25 -0700 (PDT) Subject: [PATCH 2/6] frv/PCI: Use list_for_each_entry() for bus->devices traversal To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: David Howells Date: Thu, 16 Aug 2012 17:26:25 -0600 Message-ID: <20120816232625.3662.28141.stgit@bhelgaas.mtv.corp.google.com> In-Reply-To: <20120816232620.3662.90438.stgit@bhelgaas.mtv.corp.google.com> References: <20120816232620.3662.90438.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlGBYxwfSgH80cR4z52DgkRAu0WDFK/xq/BSBpTuiKPqzHEfUK94IJ4yFzeHwmBAsxe4Hm/y5bKpeEBzqrQ69WNJnz4uv7EcAMI20RK8y1P0kh4amYm66InQ8+1XFZ82WuVrFdBv5cNzP3tdPxznwa3ii+Vut79rNPavXSTuX6Mr4VogkBcQRGXeg+PsMUyvRzeQ3xEC/Fa9aeAvdwX5sZA/n/Fzw== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Replace open-coded list traversal with list_for_each_entry(). Signed-off-by: Bjorn Helgaas CC: David Howells --- arch/frv/mb93090-mb00/pci-vdk.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index d04ed14..71e9bcf 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c @@ -330,10 +330,8 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) pci_read_bridge_bases(bus); if (bus->number == 0) { - struct list_head *ln; struct pci_dev *dev; - for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) { - dev = pci_dev_b(ln); + list_for_each_entry(dev, &bus->devices, bus_list) { if (dev->devfn == 0) { dev->resource[0].start = 0; dev->resource[0].end = 0;