Re: [PATCH 5/5] drm/i915/fixed: cosmetic cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

<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@xxxxxxxxxxxxxxx>

Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux