[PATCH 09/15] nvme: add Clang context annotations for nvme_subsystems_lock
Bart Van Assche
bvanassche at acm.org
Wed Jun 10 09:30:46 PDT 2026
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.
More information about the Linux-nvme
mailing list