Re: [PATCH v2] locking/rtmutex: Annotate API and implementation
From: Sebastian Andrzej Siewior
Date: Tue May 05 2026 - 12:17:08 EST
On 2026-05-05 17:26:05 [+0200], Bart Van Assche wrote:
> On 5/5/26 4:03 PM, Sebastian Andrzej Siewior wrote:
> > I have here clang-22 and make with CONFIG_WARN_CONTEXT_ANALYSIS_ALL=n
> > and CONFIG_WARN_CONTEXT_ANALYSIS=y. I don't see any warning without your
> > patch during "make kernel/locking/".
>
> That is expected.
Ah okay.
> > The change
> > CONTEXT_ANALYSIS_rtmutex.o := y
> >
> > is not needed because rtmutex.o is not compiled on its own:
>
> Agreed. Do you perhaps want me to repost this patch with that line left
> out?
>
> In case it would not be clear, the goal of this patch is to let the
> compiler verify whether users of the rtmutex_*() API use this API
> correctly.
I somehow did not connect the dots. I just did comment on the patch
after reading this one. But yes, please remove
CONTEXT_ANALYSIS_rtmutex.o since it is not required.
> Thanks,
>
> Bart.
Sebastian