]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: allow GEM_BUG_ON expr checking with !DEBUG_GEM
authorMatthew Auld <matthew.auld@intel.com>
Fri, 2 Dec 2016 18:47:50 +0000 (18:47 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 5 Dec 2016 20:49:17 +0000 (20:49 +0000)
commit4cfa20c8345f04f0aa3ab5e33aa4487bbbcd8d9e
treebbdc45147ddb1a27c8a9393f9e1f65ddf5908529
parent0798cff46bb2fc9ac24d5d465216db235a8f11f6
drm/i915: allow GEM_BUG_ON expr checking with !DEBUG_GEM

Use BUILD_BUG_ON_INVALID(expr) in GEM_BUG_ON when building without
DEBUG_GEM. This means the compiler can now check the validity of expr
without generating any code, in turn preventing us from inadvertently
breaking the build when DEBUG_GEM is not enabled.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161202184750.3843-1-matthew.auld@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem.h