All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Remove WARN_ON and WARN_ON_ONCE overrides.
@ 2020-04-02  5:52 ` Pankaj Bharadiya
  0 siblings, 0 replies; 10+ messages in thread
From: Pankaj Bharadiya @ 2020-04-02  5:52 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Joonas Lahtinen,
	Rodrigo Vivi, David Airlie
  Cc: pankaj.laxminarayan.bharadiya

Now we have new struct drm_device based drm_WARN* macros. These are
preferred over the regular WARN* macros.

Remove WARN_ON and WARN_ON_ONCE overriedes to avoid any temptations to
use them in the future.

Suggested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/i915/i915_utils.h | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
index 03a73d2bd50d..c666a64375d9 100644
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
@@ -36,21 +36,6 @@ struct timer_list;
 
 #define FDO_BUG_URL "https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs"
 
-#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 case (%s == %ld)\n", \
 			     __stringify(x), (long)(x))
 
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-04-03 10:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-02  5:52 [PATCH] drm/i915: Remove WARN_ON and WARN_ON_ONCE overrides Pankaj Bharadiya
2020-04-02  5:52 ` [Intel-gfx] " Pankaj Bharadiya
2020-04-02  6:22 ` Jani Nikula
2020-04-02  6:22   ` [Intel-gfx] " Jani Nikula
2020-04-02  7:27   ` Daniel Vetter
2020-04-02  7:27     ` [Intel-gfx] " Daniel Vetter
2020-04-02  8:09     ` Jani Nikula
2020-04-02  8:09       ` [Intel-gfx] " Jani Nikula
2020-04-02  7:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-03 10:34 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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.