From patchwork Tue Apr 14 01:28:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 17986 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 n3E1TNVQ008261 for ; Tue, 14 Apr 2009 01:29:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751531AbZDNB3D (ORCPT ); Mon, 13 Apr 2009 21:29:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751697AbZDNB3D (ORCPT ); Mon, 13 Apr 2009 21:29:03 -0400 Received: from hera.kernel.org ([140.211.167.34]:38740 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbZDNB3B (ORCPT ); Mon, 13 Apr 2009 21:29:01 -0400 Received: from [10.6.76.26] (sca-ea-fw-1.Sun.COM [192.18.43.225]) (authenticated bits=0) by hera.kernel.org (8.14.2/8.13.8) with ESMTP id n3E1SvwD005006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Apr 2009 01:29:00 GMT Message-ID: <49E3E6D6.90101@kernel.org> Date: Mon, 13 Apr 2009 18:28:54 -0700 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: Jesse Barnes , linux-pci@vger.kernel.org Subject: [PATCH] pci: don't printout if the bus res size is 0 X-Virus-Scanned: ClamAV 0.93.3/9228/Sun Apr 12 23:21:25 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 Impact: cleanup also print out if it is prefetechable mmio 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); } }