From patchwork Sat Apr 18 08:46:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 18803 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 n3I8kgva008573 for ; Sat, 18 Apr 2009 08:46:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbZDRIql (ORCPT ); Sat, 18 Apr 2009 04:46:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753279AbZDRIql (ORCPT ); Sat, 18 Apr 2009 04:46:41 -0400 Received: from hera.kernel.org ([140.211.167.34]:39367 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660AbZDRIqk (ORCPT ); Sat, 18 Apr 2009 04:46:40 -0400 Received: from [192.168.101.7] (adsl-75-36-250-224.dsl.pltn13.sbcglobal.net [75.36.250.224]) (authenticated bits=0) by hera.kernel.org (8.14.2/8.13.8) with ESMTP id n3I8kMkN012774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Apr 2009 08:46:23 GMT Message-ID: <49E99355.6090609@kernel.org> Date: Sat, 18 Apr 2009 01:46:13 -0700 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: Jesse Barnes , Ingo Molnar CC: linux-pci@vger.kernel.org, "linux-kernel@vger.kernel.org" Subject: [PATCH 3/3] pci: don't printout if the bus res size is 0 References: <49E992C2.4010707@kernel.org> In-Reply-To: <49E992C2.4010707@kernel.org> X-Virus-Scanned: ClamAV 0.93.3/9254/Fri Apr 17 23:36:48 2009 on hera.kernel.org X-Virus-Status: Clean Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org also print out if it is prefetechable mmio [Impact: cleanup] Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 Index: linux-2.6/drivers/pci/setup-bus.c =================================================================== --- linux-2.6.orig/drivers/pci/setup-bus.c +++ linux-2.6/drivers/pci/setup-bus.c @@ -558,11 +558,13 @@ static void pci_bus_dump_res(struct pci_ for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { struct resource *res = bus->resource[i]; - if (!res) + if (!res || !res->end) continue; dev_printk(KERN_DEBUG, &bus->dev, "resource %d %s %pR\n", i, - (res->flags & IORESOURCE_IO) ? "io: " : "mem:", res); + (res->flags & IORESOURCE_IO) ? "io: " : + ((res->flags & IORESOURCE_PREFETCH)? "pref mem":"mem:"), + res); } }