lkml.org 
[lkml]   [2008]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 17/28] 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@hp.com>
Acked-by: Rene Herman <rene.herman@gmail.com>

Index: work14/drivers/pnp/support.c
===================================================================
--- work14.orig/drivers/pnp/support.c 2008-06-24 16:58:34.000000000 -0600
+++ work14/drivers/pnp/support.c 2008-06-24 17:09:13.000000000 -0600
@@ -79,7 +79,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;

--


\
 
 \ /
  Last update: 2008-06-28 01:09    [W:0.124 / U:7.416 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site