From patchwork Tue May 26 07:06:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 25932 X-Patchwork-Delegate: jbarnes@virtuousgeek.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4Q74Mcf021310 for ; Tue, 26 May 2009 07:06:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420AbZEZHG3 (ORCPT ); Tue, 26 May 2009 03:06:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751755AbZEZHG3 (ORCPT ); Tue, 26 May 2009 03:06:29 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:33644 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbZEZHG2 (ORCPT ); Tue, 26 May 2009 03:06:28 -0400 Received: from m6.gw.fujitsu.co.jp ([10.0.50.76]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n4Q76T2T013318 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Tue, 26 May 2009 16:06:29 +0900 Received: from smail (m6 [127.0.0.1]) by outgoing.m6.gw.fujitsu.co.jp (Postfix) with ESMTP id 217CF45DE50 for ; Tue, 26 May 2009 16:06:29 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (s6.gw.fujitsu.co.jp [10.0.50.96]) by m6.gw.fujitsu.co.jp (Postfix) with ESMTP id 033FA45DE4F for ; Tue, 26 May 2009 16:06:29 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id C63611DB8041 for ; Tue, 26 May 2009 16:06:28 +0900 (JST) Received: from m105.s.css.fujitsu.com (m105.s.css.fujitsu.com [10.249.87.105]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id 7FD421DB803E for ; Tue, 26 May 2009 16:06:28 +0900 (JST) Received: from m105.css.fujitsu.com (m105 [127.0.0.1]) by m105.s.css.fujitsu.com (Postfix) with ESMTP id 5327A5D8003; Tue, 26 May 2009 16:06:28 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m105.s.css.fujitsu.com (Postfix) with ESMTP id A568C5D8001; Tue, 26 May 2009 16:06:27 +0900 (JST) Message-ID: <4A1B94E2.6060009@jp.fujitsu.com> Date: Tue, 26 May 2009 16:06:10 +0900 From: Kenji Kaneshige User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: "linux-pci@vger.kernel.org" , Jesse Barnes Subject: [PATCH 3/6] PCI: use pci_is_root_bus() in pci_find_upstream_pcie_bridge() References: <4A1B9460.8040008@jp.fujitsu.com> In-Reply-To: <4A1B9460.8040008@jp.fujitsu.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Use pci_is_root_bus() in pci_find_upstream_pcie_bridge() to check if the pci bus is root, for code consistency. Signed-off-by: Kenji Kaneshige --- drivers/pci/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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 Index: 20090526/drivers/pci/search.c =================================================================== --- 20090526.orig/drivers/pci/search.c +++ 20090526/drivers/pci/search.c @@ -29,7 +29,7 @@ pci_find_upstream_pcie_bridge(struct pci if (pdev->is_pcie) return NULL; while (1) { - if (!pdev->bus->parent) + if (pci_is_root_bus(pdev->bus)) break; pdev = pdev->bus->self; /* a p2p bridge */