Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[patch 08/15] PNP: in debug resource dump, make empty list obvious

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


bjorn.helgaas at hp

May 30, 2008, 3:49 PM

Post #1 of 2 (195 views)
Permalink
[patch 08/15] PNP: in debug resource dump, make empty list obvious

If the resource list is empty, say that explicitly. Previously,
it was confusing because often the heading was followed by zero
resource lines, then some "add resource" lines from auto-assignment,
so the "add" lines looked like current resources.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas [at] hp>

Index: work10/drivers/pnp/support.c
===================================================================
--- work10.orig/drivers/pnp/support.c 2008-05-16 16:01:26.000000000 -0600
+++ work10/drivers/pnp/support.c 2008-05-16 16:13:42.000000000 -0600
@@ -77,7 +77,12 @@ void dbg_pnp_show_resources(struct pnp_d
struct pnp_resource *pnp_res;
struct resource *res;

- dev_dbg(&dev->dev, "current resources: %s\n", desc);
+ if (list_empty(&dev->resources)) {
+ dev_dbg(&dev->dev, "%s: no current resources\n", desc);
+ return;
+ }
+
+ dev_dbg(&dev->dev, "%s: current resources:\n", desc);
list_for_each_entry(pnp_res, &dev->resources, list) {
res = &pnp_res->res;


--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


rene.herman at keyaccess

Jun 1, 2008, 2:44 PM

Post #2 of 2 (157 views)
Permalink
Re: [patch 08/15] PNP: in debug resource dump, make empty list obvious [In reply to]

On 31-05-08 00:49, Bjorn Helgaas wrote:

> If the resource list is empty, say that explicitly. Previously,
> it was confusing because often the heading was followed by zero
> resource lines, then some "add resource" lines from auto-assignment,
> so the "add" lines looked like current resources.
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas [at] hp>

Acked-by: Rene Herman <rene.herman [at] gmail>

Rene.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.