Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765593AbYF0XHN (ORCPT ); Fri, 27 Jun 2008 19:07:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762379AbYF0W7V (ORCPT ); Fri, 27 Jun 2008 18:59:21 -0400 Received: from g1t0029.austin.hp.com ([15.216.28.36]:13551 "EHLO g1t0029.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763817AbYF0W7E (ORCPT ); Fri, 27 Jun 2008 18:59:04 -0400 Message-Id: <20080627225801.733883737@ldl.fc.hp.com> References: <20080627225651.663174474@ldl.fc.hp.com> User-Agent: quilt/0.46-1 Date: Fri, 27 Jun 2008 16:57:08 -0600 From: Bjorn Helgaas To: Len Brown To: Andi Kleen Cc: linux-acpi@vger.kernel.org, Rene Herman Cc: linux-kernel@vger.kernel.org Cc: Adam Belay Cc: Adam M Belay Cc: Li Shaohua Cc: Matthieu Castet Cc: Thomas Renninger Cc: Rene Herman Cc: Jaroslav Kysela Cc: Andrew Morton Cc: Takashi Iwai Cc: Jiri Slaby Cc: David Howells Cc: Bartlomiej Zolnierkiewicz Subject: [patch 17/28] PNP: in debug resource dump, make empty list obvious Content-Disposition: inline; filename=pnp-improve-debug-resource-dump X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1269 Lines: 33 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 Acked-by: Rene Herman 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; -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/