[Intel-gfx] [PATCH 2/2] drm/i915: Sort DEV_INFO_FOR_EACH_FLAG
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Thu Oct 6 10:10:51 UTC 2016
On 04/10/2016 14:32, Chris Wilson wrote:
> On Tue, Oct 04, 2016 at 03:42:58PM +0300, Joonas Lahtinen wrote:
>> Sort DEV_INFO_FOR_EACH_FLAG to alphabetical order (except is_*).
>>
>> Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Ok. Looks like it should be easier to read.
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
>
> Could you add something like:
>
> /* Keep is_* in chronological order */
> ....
> /* Keep has_* in alphabetical order */
> ...
You could also push is_mobile and is_preliminary to the end of the is_
block which would be a micro-opt for the "IS_SKYLAKE || IS_KABYLAKE"
code and similar for the checks for the earlier hardware. If flags for
things of similar age end up in the same byte then checking for compound
conditions is shorter. :) As it stands they are just split across byte
boundaries. :))
Regards,
Tvrtko
More information about the Intel-gfx
mailing list