[Intel-gfx] [PATCH] drm/i915: Satisfy smatch that a loop has at least one iteration

Matthew Auld matthew.william.auld at gmail.com
Fri Jan 17 13:21:36 UTC 2020


On Fri, 17 Jan 2020 at 11:06, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>
> Smatch worries that the engine->mask may be 0 leading to the loop being
> shortcircuited leaving the next pointer unset,
>
> drivers/gpu/drm/i915/i915_active.c:667 i915_active_acquire_preallocate_barrier() error: uninitialized symbol 'next'.
>
> Assert that mask is not 0 and smatch can then verify that next must be
> initialised before use.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the Intel-gfx mailing list