From patchwork Tue May 14 16:51:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2567981 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 221C73FC5A for ; Tue, 14 May 2013 16:55:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758242Ab3ENQxj (ORCPT ); Tue, 14 May 2013 12:53:39 -0400 Received: from mail-da0-f51.google.com ([209.85.210.51]:56151 "EHLO mail-da0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758213Ab3ENQxg (ORCPT ); Tue, 14 May 2013 12:53:36 -0400 Received: by mail-da0-f51.google.com with SMTP id h15so416247dan.38 for ; Tue, 14 May 2013 09:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=cjVJv/Vd2sTGJ94Q5woGFt+M1Bgfp4rcz51/rEXN4xg=; b=Ur1VBdxp1i4ZIqB0m46iNYGQsp3Gl3Ysz+eQrg02MyGXxEQtjotMw4z0YvZUCz71US /HgXaNHszdVyOMu4dJdGk9dGTChHoq+pxL7krhiaZV/XfxCAIB63fdAx3C5AkrJFQrpx f6PCc2sU+lXQI3bWmSMa42h7YJcG019UfMEAHH7tH5pKDjN3kwpyOgsO74JAK//vpSrv +zmHtq+BNPG9BVWrRDOV2eyuXy0Vo48pCkMkNz2QpC+jcKbjwY2yoXFqSmp5pnnWmyEb 9wvnr72xLg7HmeEQb9wnHRjQRRwwgHnRBgss5TOGylJcunx979IcDZv78yCo9F+hceri D+5Q== X-Received: by 10.66.217.226 with SMTP id pb2mr35332260pac.109.1368550415279; Tue, 14 May 2013 09:53:35 -0700 (PDT) Received: from localhost.localdomain ([120.196.98.100]) by mx.google.com with ESMTPSA id v5sm18919924pbz.4.2013.05.14.09.53.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 May 2013 09:53:34 -0700 (PDT) From: Jiang Liu To: Bjorn Helgaas , Yinghai Lu Cc: Jiang Liu , "Rafael J . Wysocki" , Greg Kroah-Hartman , Gu Zheng , Toshi Kani , Myron Stowe , Yijing Wang , Jiang Liu , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Doug Thompson , linux-edac@vger.kernel.org Subject: [RFC PATCH v2, part 2 14/18] PCI, EDAC: use hotplug-safe PCI bus iterators to walk PCI buses Date: Wed, 15 May 2013 00:51:58 +0800 Message-Id: <1368550322-1045-14-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1368550322-1045-1-git-send-email-jiang.liu@huawei.com> References: <1368550322-1045-1-git-send-email-jiang.liu@huawei.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Enhance EDAC drviers to use hotplug-safe iterators to walk PCI buses. Signed-off-by: Jiang Liu Cc: Mauro Carvalho Chehab Cc: Doug Thompson Cc: linux-edac@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/edac/i7core_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 0ec3e95..39d5823 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -1296,7 +1296,7 @@ static unsigned i7core_pci_lastbus(void) int last_bus = 0, bus; struct pci_bus *b = NULL; - while ((b = pci_find_next_bus(b)) != NULL) { + for_each_pci_root_bus(b) bus = b->number; edac_dbg(0, "Found bus %d\n", bus); if (bus > last_bus)