[Intel-gfx] [PATCH] drm/i915: Use MAYBE_BUILD_BUG_ON in _wait_for_atomic()
Michal Wajdeczko
michal.wajdeczko at intel.com
Sat Apr 8 16:28:51 UTC 2017
Non builtin constant passed as timeout parameter to _wait_for_atomic() macro
causes build break under GCC 4.4.7 due to BUILD_BUG_ON that checks upper bound.
Switch into MAYBE_BUILD_BUG_ON as it can correctly determine parameter class.
Fixes: 1d1a9774 ("drm/i915: Extend intel_wait_for_register_fw() with fast timeout")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_drv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 7bc0c25..13a54a8 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -88,7 +88,7 @@
int cpu, ret, timeout = (US) * 1000; \
u64 base; \
_WAIT_FOR_ATOMIC_CHECK(ATOMIC); \
- BUILD_BUG_ON((US) > 50000); \
+ MAYBE_BUILD_BUG_ON((US) > 50000); \
if (!(ATOMIC)) { \
preempt_disable(); \
cpu = smp_processor_id(); \
--
2.7.4
More information about the Intel-gfx
mailing list