diff options
author | Jani Nikula <jani.nikula@intel.com> | 2016-10-04 12:54:12 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2016-10-04 13:07:50 +0300 |
commit | ff64aa1e630087381511c4d25de0657824f40efa (patch) | |
tree | e2c89972db8123e16b8d74072200f0bd92d99b16 /drivers/gpu | |
parent | d9c409d67131e62f357b43cf03af4c0caab45721 (diff) | |
download | op-kernel-dev-ff64aa1e630087381511c4d25de0657824f40efa.zip op-kernel-dev-ff64aa1e630087381511c4d25de0657824f40efa.tar.gz |
drm/i915: workaround sparse warning on variable length arrays
Fix sparse warning:
drivers/gpu/drm/i915/intel_device_info.c:195:31: warning: Variable
length array is used.
In truth the array does have constant length, but sparse is too dumb to
realize. This is a bit ugly, but silence the warning no matter what.
Fixes: 91bedd34abf0 ("drm/i915/bdw: Check for slice, subslice and EU count for BDW")
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1475574853-4178-1-git-send-email-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_device_info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c index 73b6858..1b20e16 100644 --- a/drivers/gpu/drm/i915/intel_device_info.c +++ b/drivers/gpu/drm/i915/intel_device_info.c @@ -192,7 +192,7 @@ static void broadwell_sseu_info_init(struct drm_i915_private *dev_priv) struct sseu_dev_info *sseu = &mkwrite_device_info(dev_priv)->sseu; const int s_max = 3, ss_max = 3, eu_max = 8; int s, ss; - u32 fuse2, eu_disable[s_max]; + u32 fuse2, eu_disable[3]; /* s_max */ fuse2 = I915_READ(GEN8_FUSE2); sseu->slice_mask = (fuse2 & GEN8_F2_S_ENA_MASK) >> GEN8_F2_S_ENA_SHIFT; |