[Intel-gfx] [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition
Chris Wilson
chris at chris-wilson.co.uk
Fri Nov 16 10:52:53 UTC 2018
Quoting Jani Nikula (2018-11-15 12:01:24)
> No need to use a compound statement enclosed in parenthesis where a C99
> compound literal will do. No functional changes.
>
> 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 08316e50167a..927c59395569 100644
> --- a/drivers/gpu/drm/i915/i915_fixed.h
> +++ b/drivers/gpu/drm/i915/i915_fixed.h
> @@ -7,11 +7,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 })
Following the standard set by pgprot_t
#define u16_16(x) ((u16_16_t){ .val = (x) })
#define U16_16_MAX u16_16(U32_MAX)
-Chris
More information about the Intel-gfx
mailing list