Re: [PATCH 06/17] sched: assert static storage for wait queue and completion declarations

From: sashiko-bot

Date: Mon Sep 14 2026 - 23:31:09 EST


> The ordinary wait queue and completion declarations statically initialize
> their embedded locks. Automatic objects need runtime initialization so
> lockdep receives persistent class keys.
>
> Add ASSERT_STATIC_STORAGE() to DECLARE_WAIT_QUEUE_HEAD(),
> DECLARE_SWAIT_QUEUE_HEAD() and DECLARE_COMPLETION(). Keep the _ONSTACK
> variants usable without CONFIG_LOCKDEP by expanding to the underlying
> initializer instead of an asserted declaration.
>
> Convert the two automatic completions in the AMS PMU driver to
> DECLARE_COMPLETION_ONSTACK().
>
> Assisted-by: OpenAI Codex
> Signed-off-by: Yury Norov <ynorov@xxxxxxxxxx>

Sashiko has reviewed this patch and found no issues. It looks great!

--
Sashiko AI review · https://sashiko.dev/#/patchset/20260915030336.1192299-1-ynorov@xxxxxxxxxx?part=6