Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 i915: Obviate need for _...



details:   https://anonhg.NetBSD.org/src/rev/aaddf757236d
branches:  trunk
changeset: 1029069:aaddf757236d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Dec 20 19:54:07 2021 +0000

description:
i915: Obviate need for __diagused on variables in GEM_BUG_ON.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_gem.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 00a22474ba8e -r aaddf757236d sys/external/bsd/drm2/dist/drm/i915/i915_gem.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h    Mon Dec 20 19:48:05 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h    Mon Dec 20 19:54:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem.h,v 1.6 2021/12/19 12:08:54 riastradh Exp $   */
+/*     $NetBSD: i915_gem.h,v 1.7 2021/12/20 19:54:07 riastradh Exp $   */
 
 /*
  * Copyright © 2016 Intel Corporation
@@ -42,8 +42,12 @@
 #define GEM_SHOW_DEBUG() drm_debug_enabled(DRM_UT_DRIVER)
 
 #ifdef __NetBSD__
+#ifdef DIAGNOSTIC
 #define        GEM_BUG_ON(condition)   KASSERT(!(condition))
 #else
+#define        GEM_BUG_ON(condition)   BUILD_BUG_ON_INVALID(condition)
+#endif
+#else
 #define GEM_BUG_ON(condition) do { if (unlikely((condition))) {        \
                GEM_TRACE_ERR("%s:%d GEM_BUG_ON(%s)\n", \
                              __func__, __LINE__, __stringify(condition)); \



Home | Main Index | Thread Index | Old Index