On Mon, 2 Dec 2024 at 01:26, Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx> wrote: > > Trying to understand what sparse wants to tell me, I tried the following > change and the 2nd warning goes away: Sparse really doesn't understand the new guard infrastructure. It gets _parsed_, but that's just about it. So it parses the cleanup function, but never actually generates the logic to _call_ the cleanup function when the variable goes out of scope. Which obviously then means that none of the context updates of the cleanup get done, and so the lock context never gets undone. Sadly, I think sparse is unmaintained these days, Linus