PCI: cleanup debug output resources
authorYinghai Lu <yinghai@kernel.org>
Tue, 14 Apr 2009 01:28:54 +0000 (18:28 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 22 Apr 2009 21:49:25 +0000 (14:49 -0700)
Remove outputs for 0 sized resources and indicate prefetchability.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/setup-bus.c

index 8d9da9d..a00f854 100644 (file)
@@ -536,11 +536,13 @@ static void pci_bus_dump_res(struct pci_bus *bus)
 
         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);
         }
 }