Re: [PATCH net] net: add inline annotation to fix the build warning
From: Edward Cree
Date: Thu Oct 03 2024 - 12:11:39 EST
On 03/10/2024 16:33, Moon Yeounsu wrote:
> On 03/10/2024 15:19, Eric Dumazet wrote:
>> It also does not know about conditional locking, it is quite useless.
> So... What do you think about who wants to send the patch to silence
> the Sparse's warning message, nevertheless?
Fwiw, my experience is that if I can't explain the locking to sparse
that's usually a sign that the code is too complex and needs to be
rewritten.
In general I'm in favour of patches to fix sparse warnings. In this
case it looks like what's needed is __cond_acquires, but the patch
to implement that in sparse[1] doesn't seem to have gotten anywhere
near Luc's tree. (Yet it's present and occasionally used in the
kernel...) CCing the sparse ML to find out why.
-ed
[1]: https://lore.kernel.org/all/CAHk-=wjZfO9hGqJ2_hGQG3U_XzSh9_XaXze=HgPdvJbgrvASfA@xxxxxxxxxxxxxx/#t