浏览代码

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

Signed-off-by: Mika Kuoppala <miku@iki.fi>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Mika Kuoppala 11 年之前
父节点
当前提交
c883ef1b1c
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/gpu/drm/i915/i915_drv.h

+ 3 - 0
drivers/gpu/drm/i915/i915_drv.h

@@ -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,