All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
@ 2017-03-28  8:45 Michal Wajdeczko
  2017-03-28  8:56 ` Joonas Lahtinen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michal Wajdeczko @ 2017-03-28  8:45 UTC (permalink / raw)
  To: intel-gfx

We can't sometimes use these macros in other headers due to
include and definition order. As i915_utils.h already contains
other helper macros move these macros there.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_drv.h   | 18 ------------------
 drivers/gpu/drm/i915/i915_utils.h | 18 ++++++++++++++++++
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 86f097d..0cbadac0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -82,24 +82,6 @@
 #define DRIVER_DATE		"20170320"
 #define DRIVER_TIMESTAMP	1489994464
 
-#undef WARN_ON
-/* Many gcc seem to no see through this and fall over :( */
-#if 0
-#define WARN_ON(x) ({ \
-	bool __i915_warn_cond = (x); \
-	if (__builtin_constant_p(__i915_warn_cond)) \
-		BUILD_BUG_ON(__i915_warn_cond); \
-	WARN(__i915_warn_cond, "WARN_ON(" #x ")"); })
-#else
-#define WARN_ON(x) WARN((x), "%s", "WARN_ON(" __stringify(x) ")")
-#endif
-
-#undef WARN_ON_ONCE
-#define WARN_ON_ONCE(x) WARN_ONCE((x), "%s", "WARN_ON_ONCE(" __stringify(x) ")")
-
-#define MISSING_CASE(x) WARN(1, "Missing switch case (%lu) in %s\n", \
-			     (long) (x), __func__);
-
 /* Use I915_STATE_WARN(x) and I915_STATE_WARN_ON() (rather than WARN() and
  * WARN_ON()) for hw state sanity checks to check for unexpected conditions
  * which may not necessarily be a user visible problem.  This will either
diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
index 94a3a32..f870969 100644
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
@@ -25,6 +25,24 @@
 #ifndef __I915_UTILS_H
 #define __I915_UTILS_H
 
+#undef WARN_ON
+/* Many gcc seem to no see through this and fall over :( */
+#if 0
+#define WARN_ON(x) ({ \
+	bool __i915_warn_cond = (x); \
+	if (__builtin_constant_p(__i915_warn_cond)) \
+		BUILD_BUG_ON(__i915_warn_cond); \
+	WARN(__i915_warn_cond, "WARN_ON(" #x ")"); })
+#else
+#define WARN_ON(x) WARN((x), "%s", "WARN_ON(" __stringify(x) ")")
+#endif
+
+#undef WARN_ON_ONCE
+#define WARN_ON_ONCE(x) WARN_ONCE((x), "%s", "WARN_ON_ONCE(" __stringify(x) ")")
+
+#define MISSING_CASE(x) WARN(1, "Missing switch case (%lu) in %s\n", \
+			     (long) (x), __func__);
+
 #if GCC_VERSION >= 70000
 #define add_overflows(A, B) \
 	__builtin_add_overflow_p((A), (B), (typeof((A) + (B)))0)
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
  2017-03-28  8:45 [PATCH] drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h Michal Wajdeczko
@ 2017-03-28  8:56 ` Joonas Lahtinen
  2017-03-28  9:33 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2017-03-29 10:13 ` [PATCH] " Chris Wilson
  2 siblings, 0 replies; 5+ messages in thread
From: Joonas Lahtinen @ 2017-03-28  8:56 UTC (permalink / raw)
  To: Michal Wajdeczko, intel-gfx

On ti, 2017-03-28 at 08:45 +0000, Michal Wajdeczko wrote:
> We can't sometimes use these macros in other headers due to
> include and definition order. As i915_utils.h already contains
> other helper macros move these macros there.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: failure for drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
  2017-03-28  8:45 [PATCH] drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h Michal Wajdeczko
  2017-03-28  8:56 ` Joonas Lahtinen
@ 2017-03-28  9:33 ` Patchwork
  2017-03-28  9:54   ` Michal Wajdeczko
  2017-03-29 10:13 ` [PATCH] " Chris Wilson
  2 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2017-03-28  9:33 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
URL   : https://patchwork.freedesktop.org/series/21993/
State : failure

== Summary ==

Series 21993v1 drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
https://patchwork.freedesktop.org/api/1.0/series/21993/revisions/1/mbox/

Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-c-frame-sequence:
                pass       -> FAIL       (fi-skl-6700hq)

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time: 461s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time: 452s
fi-bsw-n3050     total:278  pass:239  dwarn:0   dfail:0   fail:0   skip:39  time: 585s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time: 536s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time: 571s
fi-byt-j1900     total:278  pass:251  dwarn:0   dfail:0   fail:0   skip:27  time: 509s
fi-byt-n2820     total:278  pass:247  dwarn:0   dfail:0   fail:0   skip:31  time: 504s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 434s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 432s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time: 444s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 521s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 501s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 483s
fi-kbl-7560u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 593s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 479s
fi-skl-6700hq    total:278  pass:260  dwarn:0   dfail:0   fail:1   skip:17  time: 596s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time: 491s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 534s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time: 462s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time: 549s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time: 437s

2b51c2073441cc5b3b18c7e0e8716cbf3736e873 drm-tip: 2017y-03m-28d-08h-54m-35s UTC integration manifest
5402f7b drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4322/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ✗ Fi.CI.BAT: failure for drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
  2017-03-28  9:33 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-03-28  9:54   ` Michal Wajdeczko
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Wajdeczko @ 2017-03-28  9:54 UTC (permalink / raw)
  To: intel-gfx

On Tue, Mar 28, 2017 at 09:33:20AM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
> URL   : https://patchwork.freedesktop.org/series/21993/
> State : failure
> 
> == Summary ==
> 
> Series 21993v1 drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
> https://patchwork.freedesktop.org/api/1.0/series/21993/revisions/1/mbox/
> 
> Test kms_pipe_crc_basic:
>         Subgroup read-crc-pipe-c-frame-sequence:
>                 pass       -> FAIL       (fi-skl-6700hq)

This failure is unrelated to the patch.

-Michal

> 
> fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time: 461s
> fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time: 452s
> fi-bsw-n3050     total:278  pass:239  dwarn:0   dfail:0   fail:0   skip:39  time: 585s
> fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time: 536s
> fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time: 571s
> fi-byt-j1900     total:278  pass:251  dwarn:0   dfail:0   fail:0   skip:27  time: 509s
> fi-byt-n2820     total:278  pass:247  dwarn:0   dfail:0   fail:0   skip:31  time: 504s
> fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 434s
> fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 432s
> fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time: 444s
> fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 521s
> fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 501s
> fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 483s
> fi-kbl-7560u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 593s
> fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 479s
> fi-skl-6700hq    total:278  pass:260  dwarn:0   dfail:0   fail:1   skip:17  time: 596s
> fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time: 491s
> fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 534s
> fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time: 462s
> fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time: 549s
> fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time: 437s
> 
> 2b51c2073441cc5b3b18c7e0e8716cbf3736e873 drm-tip: 2017y-03m-28d-08h-54m-35s UTC integration manifest
> 5402f7b drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4322/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h
  2017-03-28  8:45 [PATCH] drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h Michal Wajdeczko
  2017-03-28  8:56 ` Joonas Lahtinen
  2017-03-28  9:33 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-03-29 10:13 ` Chris Wilson
  2 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-03-29 10:13 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

On Tue, Mar 28, 2017 at 08:45:12AM +0000, Michal Wajdeczko wrote:
> We can't sometimes use these macros in other headers due to
> include and definition order. As i915_utils.h already contains
> other helper macros move these macros there.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>

Cleanup up a couple of checkpatch warnings -- there was a a trailing ';'
for MISSING_CASE, so no longer the pure move :-p

Pushed, thanks for the patch.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-03-29 10:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28  8:45 [PATCH] drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h Michal Wajdeczko
2017-03-28  8:56 ` Joonas Lahtinen
2017-03-28  9:33 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-03-28  9:54   ` Michal Wajdeczko
2017-03-29 10:13 ` [PATCH] " Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.