Re: [PATCH -v2] notifier: Return non-null when callback is already registered
From: Borislav Petkov
Date: Fri Jun 04 2021 - 12:48:47 EST
On Fri, Jun 04, 2021 at 04:44:29PM +0000, Sean Christopherson wrote:
> The WARN is still going to make that "necessary", and the vast number of callers
> and variations that don't check the return value means that WARN isn't going
> anywhere for quite some time. Returning an error code still makes sense, but
> the changelog is misleading in that it implies callers can blindly register
> without any repercussions.
Yeah, so tglx gave me a much better idea on IRC: make that function
__must_check and drop the WARN.
I'll play with a full allmodconfig build and see what complains and
whether I can make it into a kernelnewbies project. :)
Thanks for the review anyway, I'll use some of it in the new version.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette