diff mbox

pci: don't printout if the bus res size is 0

Message ID 49E3E6D6.90101@kernel.org (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Yinghai Lu April 14, 2009, 1:28 a.m. UTC
Impact: cleanup

also print out if it is prefetechable mmio

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 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

Comments

Jesse Barnes April 22, 2009, 10:03 p.m. UTC | #1
On Mon, 13 Apr 2009 18:28:54 -0700
Yinghai Lu <yinghai@kernel.org> wrote:

> 
> Impact: cleanup
> 
> also print out if it is prefetechable mmio
> 
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>

Applied, thanks (I'll fix up the pref -> prefetchable myself).
diff mbox

Patch

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);
         }
 }