Re: [PATCH 09/15] nvme: add Clang context annotations for nvme_subsystems_lock
From: Bart Van Assche
Date: Wed Jun 10 2026 - 12:38:45 EST
On 6/10/26 7:27 AM, Nilay Shroff wrote:
- INIT_LIST_HEAD(&subsys->ctrls);
+ /*
+ * Initializing subsys->ctrls list doesn't need to be protected
+ * using @nvme_subsystems_lock. So suppress the Clang's warning
+ * declaring context_unsafe.
+ */
+ context_unsafe(INIT_LIST_HEAD(&subsys->ctrls));
Why context_unsafe() instead of scoped_guard(mutex_init, ...)?
Thanks,
Bart.