Re: [PATCH 2/3] firmware: qcom: uefisecapp: Annotate acquiring locks for sparse

From: Johan Hovold

Date: Mon Feb 16 2026 - 03:20:47 EST


On Mon, Feb 16, 2026 at 09:14:13AM +0100, Krzysztof Kozlowski wrote:
> On 16/02/2026 09:00, Johan Hovold wrote:
> > On Sun, Feb 15, 2026 at 12:05:50PM +0100, Krzysztof Kozlowski wrote:
> >> qcuefi_acquire() and qcuefi_release() end with mutex locked or unlocked
> >> respectively, so annotate them so the lock usage will be tracked by
> >> sparse.

> > The mutex implementation does not use sparse annotation so this actually
> > introduces sparse warnings (unless something changed very recently).
> >
> > See
> >
> > https://lore.kernel.org/all/ZJ11H8btBhvCx9gD@xxxxxxxxxxxxxxxxxxxx/
> >
> > for what his looks like for the code in question.
>
> I checked with sparse and there were no warnings. More importantly,
> mutex uses __acquires, so this apparently changed:
>
> https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mutex.h#n214

Thanks for checking. This is apparently about to change for v7.0-rc1:

370f0a345a70 ("locking/mutex: Support Clang's context analysis")

Johan