[Intel-gfx] [PATCH] drm/i915: use BUILD_BUG_ON to ensure platform name has been set up

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Feb 28 12:42:52 UTC 2017


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.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list