Appease static analysers by making sure subslice always have a value. drivers/gpu/drm/i915//gt/intel_engine_cs.c:971 intel_sseu_fls_subslice() error: uninitialized symbol 'subslice'. There's also the nagging question of whether that fls() is off-by-one... Fixes: 1ac159e23c2c ("drm/i915: Expand subslice mask") Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx> Cc: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx> Cc: Stuart Summers <stuart.summers@xxxxxxxxx> Cc: Manasi Navare <manasi.d.navare@xxxxxxxxx> --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c index 158722b50691..fc880424be2f 100644 --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c @@ -956,12 +956,12 @@ const char *i915_cache_level_str(struct drm_i915_private *i915, int type) static inline u32 intel_sseu_fls_subslice(const struct sseu_dev_info *sseu, u32 slice) { - u32 subslice; + const u8 *subslice_mask = sseu->subslice_mask + slice * sseu->ss_stride; + u32 subslice = 0; int i; for (i = sseu->ss_stride - 1; i >= 0; i--) { - subslice = fls(sseu->subslice_mask[slice * sseu->ss_stride + - i]); + subslice = fls(subslice_mask[i]); if (subslice) { subslice += i * BITS_PER_BYTE; break; -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx