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@xxxxxxxxxxxxxxx> Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx