[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1352343356-4006-4-git-send-email-peter@hurleysoftware.com>
Date: Wed, 7 Nov 2012 21:55:54 -0500
From: Peter Hurley <peter@...leysoftware.com>
To: linux-kernel@...r.kernel.org
Cc: Peter Hurley <peter@...leysoftware.com>,
Bjorn Helgaas <bhelgaas@...gle.com>
Subject: [PATCH 3/5] resources: Print warning when inserting resource [mem 0x00000000]
Inserting iomem resource [0x0-0x0] is most likely a bug; at least
print a warning message. Eg.,
resource: inserting NULL resource iTCO_wdt [mem 0x00000000]
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Signed-off-by: Peter Hurley <peter@...leysoftware.com>
---
kernel/resource.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/resource.c b/kernel/resource.c
index 268b5fa..ab758bb 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -589,6 +589,9 @@ static struct resource * __insert_resource(struct resource *parent, struct resou
{
struct resource *first, *next;
+ if (new->flags & IORESOURCE_MEM && !new->start && !new->end)
+ pr_warn("inserting NULL resource %s %pR", new->name, new);
+
for (;; parent = first) {
first = __request_resource(parent, new);
if (!first)
--
1.7.12.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists