Skip to contentSkip to conversation

drm/i915: Redefine WARN_ON to include the condition

PATCH Applied Mika Kuoppala 2 participants 2 messages Oct 28, 2014 – Nov 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Redefine WARN_ON to include the condition

When looking at the bug report logs with triggered WARN_ON, the person doing bug triaging will have to find exact kernel source and match file/line.

Attach the condition that triggered the WARN_ON to kernel log. In most cases the context is self evident and this way we can save developer time.

The drawback is ~16kbytes bigger i915.ko

---
 drivers/gpu/drm/i915/i915_drv.h | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +3 -0
index 6a73803..b6fb30f 100644
@@ -57,6 +57,9 @@
 #define DRIVER_DESC		"Intel Graphics"
 #define DRIVER_DATE		"20141024"
 
+#undef WARN_ON
+#define WARN_ON(x)		WARN(x, "WARN_ON(" #x ")")
+
 enum pipe {
 	INVALID_PIPE = -1,
 	PIPE_A = 0,
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 11 lines · Mika Kuoppala

When looking at the bug report logs with triggered WARN_ON, the person doing bug triaging will have to find exact kernel source and match file/line.

Attach the condition that triggered the WARN_ON to kernel log. In most cases the context is self evident and this way we can save developer time.

The drawback is ~16kbytes bigger i915.ko

Queued for -next, thanks for the patch.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx