[Intel-gfx] [PATCH 5/5] drm/i915/fixed: cosmetic cleanup

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Nov 16 10:56:45 UTC 2018


Quoting Jani Nikula (2018-11-15 14:01:26)
> Clean up fixed point temp variable initialization, use the more
> conventional tmp name for temp variables, add empty lines before
> return. No functional changes.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

<SNIP>

>  static inline uint_fixed_16_16_t clamp_u64_to_fixed16(u64 val)
>  {
> -       uint_fixed_16_16_t fp;
> +       uint_fixed_16_16_t fp = { .val = (u32)val };

Also a possibility:

	.val = lower_32_bits(val)
	WARN_ON(upper_32_bits(val))

But your style might be more uniform across other funcs.

> +
>         WARN_ON(val > U32_MAX);
> -       fp.val = (u32)val;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas


More information about the Intel-gfx mailing list