[Intel-gfx] [PATCH] drm/i915: use BUILD_BUG_ON to ensure platform name has been set up
Jani Nikula
jani.nikula at intel.com
Tue Feb 28 14:09:35 UTC 2017
On Tue, 28 Feb 2017, Joonas Lahtinen <joonas.lahtinen at linux.intel.com> wrote:
> On ti, 2017-02-28 at 13:11 +0200, Jani Nikula wrote:
>> Leave the runtime check in place in case the platform variable itself
>> comes from bogus sources.
>>
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>
> <SNIP>
>
>> @@ -890,6 +890,7 @@ enum intel_platform {
>> INTEL_BROXTON,
>> INTEL_KABYLAKE,
>> INTEL_GEMINILAKE,
>> + INTEL_MAX_PLATFORMS
>> };
>
> Easily confused to be be off by one, INTEL_MAX_PLATFORMS =
> INTEL_GEMINILAKE, so I suggest changing it to INTEL_NUM_PLATFORMS which
> is explicit.
...and wrong. INTEL_MAX_PLATFORMS is not the same as number of supported
platforms.
BR,
Jani.
>
> Regards, Joonas
--
Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list