Re: [PATCH 10/17] klist: assert static storage for DEFINE_KLIST()

From: sashiko-bot

Date: Mon Sep 14 2026 - 23:30:05 EST


> DEFINE_KLIST() statically initializes k_lock, relying on the object
> address as a persistent lockdep class key. An automatic local klist must
> instead use klist_init().
>
> Add ASSERT_STATIC_STORAGE() to enforce this requirement at compile time.
> Keep KLIST_INIT() available for embedded objects.
>
> 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=10