[Intel-gfx] [PATCH 12/13] drm/i915: Sort the shadow register table
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Fri Sep 30 08:09:31 UTC 2016
On to, 2016-09-29 at 16:35 +0100, Tvrtko Ursulin wrote:
> +static void intel_shadow_table_check(void)
> +{
> + i915_reg_t *reg = (i915_reg_t *)gen8_shadowed_regs;
> + s32 prev = -1;
> + u32 offset;
> + unsigned int i;
> +
> + for (i = 0; i < ARRAY_SIZE(gen8_shadowed_regs); i++, reg++) {
> + offset = i915_mmio_reg_offset(*reg);
> + WARN_ON_ONCE(prev >= (s32)offset);
> + prev = offset;
> + }
> +}
> +
BUILD_BUG_ON would gain extra points, but this is fine too :)
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list