[Intel-gfx] [PATCH v2 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition
Jani Nikula
jani.nikula at intel.com
Fri Nov 16 12:07:27 UTC 2018
No need to use a compound statement enclosed in parenthesis where a C99
compound literal will do. No functional changes.
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/i915/i915_fixed.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_fixed.h b/drivers/gpu/drm/i915/i915_fixed.h
index 6c914940b4a9..da43c930dfa2 100644
--- a/drivers/gpu/drm/i915/i915_fixed.h
+++ b/drivers/gpu/drm/i915/i915_fixed.h
@@ -10,11 +10,7 @@ typedef struct {
u32 val;
} uint_fixed_16_16_t;
-#define FP_16_16_MAX ({ \
- uint_fixed_16_16_t fp; \
- fp.val = UINT_MAX; \
- fp; \
-})
+#define FP_16_16_MAX ((uint_fixed_16_16_t){ .val = UINT_MAX })
static inline bool is_fixed16_zero(uint_fixed_16_16_t val)
{
--
2.11.0
More information about the Intel-gfx
mailing list