From patchwork Sun May 26 15:53:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 246423 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 830A32C00AF for ; Mon, 27 May 2013 02:00:49 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754383Ab3EZP7H (ORCPT ); Sun, 26 May 2013 11:59:07 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:61197 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754380Ab3EZP7C (ORCPT ); Sun, 26 May 2013 11:59:02 -0400 Received: by mail-pd0-f182.google.com with SMTP id g10so5758794pdj.41 for ; Sun, 26 May 2013 08:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=f5CsJVyAPAUGdN5W3CVxfL2y/aLaJ18dK0uNewjx2+k=; b=tiq8HxIKMha/BreMCVMOYePO08bCJqqj5dnUktvAyww3CCXLMpG/l5O2vO9gMov+6v Qz/qtoeV8aok4Xr/ZWwyYZ2vqEcZzd+o9vW6oN6ZXTdB4hdgYWcD2bWpV+fz9EuAsKTj b/tj3jhp7/yn75DxtGEr8rxZXOoZ4w4o36jIh5NybqSV+YaOOdJRYInsvUGK2MN+NS+K ORfMAeffGabU9lBYym+TM+5g8PMpl/c6LX0gSRANI6KpC/sNPoeOyyg/+t0q4pv+R6pf DqrqcZ0ULi+9f0DAIJS4K4QtvjPR1uq7TzUhr4C0i3DrJFZjVIlYjbU5IutCQR6W+eMz bigQ== X-Received: by 10.68.228.161 with SMTP id sj1mr26451651pbc.151.1369583941524; Sun, 26 May 2013 08:59:01 -0700 (PDT) Received: from localhost.localdomain ([111.196.197.202]) by mx.google.com with ESMTPSA id ze11sm26603189pab.22.2013.05.26.08.58.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 May 2013 08:59:00 -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: [PATCH v3, part2 15/20] PCI, EDAC: use hotplug-safe PCI bus iterators to walk PCI buses Date: Sun, 26 May 2013 23:53:12 +0800 Message-Id: <1369583597-3801-16-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1369583597-3801-1-git-send-email-jiang.liu@huawei.com> References: <1369583597-3801-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..7146e10 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)