> DEFINE_SEMAPHORE() statically initializes its embedded raw spinlock. > Using it for an automatic local semaphore leaves lockdep without a > persistent class key. > > Reject this use with ASSERT_STATIC_STORAGE(). Automatic semaphores must > use sema_init(), which supplies a static class key. Preserve the underlying > initializer used by sema_init() and by embedded objects. > > Assisted-by: OpenAI Codex > Signed-off-by: Yury Norov <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=4

