Skip to contentSkip to conversation

drm/i915: redefine WARN_ON_ONCE to include the condition

PATCH In review Jani Nikula 2 participants 2 messages Mar 12, 2015

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

PATCH 1/1 drm/i915: redefine WARN_ON_ONCE to include the condition

Same as

commit c883ef1b1c998d2d66866772fd0fc34afa45641e

Author: Mika Kuoppala <[email protected]>
Date:   Tue Oct 28 17:32:30 2014 +0200

drm/i915: Redefine WARN_ON to include the condition

but for WARN_ON_ONCE. Since the kernel WARN_ON_ONCE actually picks up *our* version of WARN_ON, we end up with messages like

[  838.285319] WARN_ON(!__warned)

which are not that helpful.

---
 drivers/gpu/drm/i915/i915_drv.h | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +3 -0
index a80b15f7acfa..a76c6eee593c 100644
@@ -70,6 +70,9 @@
 #define WARN_ON(x) WARN((x), "WARN_ON(" #x ")")
 #endif
 
+#undef WARN_ON_ONCE
+#define WARN_ON_ONCE(x) WARN_ONCE((x), "WARN_ON_ONCE(" #x ")")
+
 #define MISSING_CASE(x) WARN(1, "Missing switch case (%lu) in %s\n", \
 			     (long) (x), __func__);
 
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 1/1
#1 lore raw

Task id: 5940 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -6 274/274 268/274
ILK 301/301 301/301
SNB -1 277/277 276/277

IVB                                  341/341              341/341
BYT                                  287/287              287/287
HSW                                  360/360              360/360
BDW                                  308/308              308/308
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
*PNV  igt_gem_userptr_blits_minor-normal-sync      PASS(4)      DMESG_WARN(1)PASS(1)
 PNV  igt_gen3_render_linear_blits      FAIL(3)PASS(3)      FAIL(2)
 PNV  igt_gen3_render_mixed_blits      FAIL(3)PASS(3)      FAIL(2)
 PNV  igt_gen3_render_tiledx_blits      FAIL(5)PASS(2)      FAIL(2)
 PNV  igt_gen3_render_tiledy_blits      FAIL(5)PASS(1)      FAIL(2)
 PNV  igt_gem_tiled_pread_pwrite      FAIL(2)PASS(2)      FAIL(2)
*SNB  igt_gem_mmap_short-mmap      PASS(2)      DMESG_WARN(1)PASS(1)

Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx