mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] common: resource: print conflicts as warning
@ 2014-06-23  8:00 Alexander Aring
  2014-06-24  6:07 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Aring @ 2014-06-23  8:00 UTC (permalink / raw)
  To: barebox

Crazy things happen if there are resource conflicts and a device probe
runs dev_request_mem_region. The dev_request_mem_region returns a
start pointer which is zero. The probe function doesn't check on this
and probing the device on zero base address.

To debug this in debug log level there are many other outputs. This patch
replace the debug print to a warning printout. A conflict should
normally never happen. If there is a conflict it's much easier to see it
with this patch.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 common/resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/resource.c b/common/resource.c
index fe4680e..1ea2a75 100644
--- a/common/resource.c
+++ b/common/resource.c
@@ -71,7 +71,7 @@ struct resource *__request_region(struct resource *parent,
 			goto ok;
 		if (start > r->end)
 			continue;
-		debug("%s: 0x%08llx:0x%08llx conflicts with 0x%08llx:0x%08llx\n",
+		pr_warn("%s: 0x%08llx:0x%08llx conflicts with 0x%08llx:0x%08llx\n",
 				__func__,
 				(unsigned long long)start,
 				(unsigned long long)end,
-- 
2.0.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-24  6:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-23  8:00 [PATCH] common: resource: print conflicts as warning Alexander Aring
2014-06-24  6:07 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox