Hi Krzysztof, On Mon, Sep 08, 2025 at 09:23:56AM +0000, Krzysztof Karas wrote: > To calm down static analysers define a default case and break > out of the test. > > Cc: Chris Wilson <ch...@chris-wilson.co.uk> > Signed-off-by: Krzysztof Karas <krzysztof.ka...@intel.com> > --- > drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c > b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c > index 78734c404a6d..6d87356e928b 100644 > --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c > +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c > @@ -498,13 +498,15 @@ static int igt_smoke_tiling(void *arg) > tile.stride = 0; > tile.swizzle = I915_BIT_6_SWIZZLE_NONE; > break; > - > case I915_TILING_X: > tile.swizzle = to_gt(i915)->ggtt->bit_6_swizzle_x; > break; > case I915_TILING_Y: > tile.swizzle = to_gt(i915)->ggtt->bit_6_swizzle_y; > break; > + default: > + err = -EINVAL; > + break;
You are breaking from the switch/case and ending up where? Should this be continue? If you really want to make static analysers happy (which we don't care much) you could do something like: case I915_TILING_NONE: default: But the C specification is not obliging anyone to use the default case, so that we can happily ignore the static analyser issue if there is no need for a default. Andi > } > > if (tile.swizzle == I915_BIT_6_SWIZZLE_9_17 || > -- > 2.34.1 > > > -- > Best Regards, > Krzysztof