Re: [PATCH v0 35/42] sh: Check notifier registration return value

From: Geert Uytterhoeven
Date: Mon Nov 08 2021 - 09:03:24 EST


Hi Borislav,

On Mon, Nov 8, 2021 at 2:49 PM Borislav Petkov <bp@xxxxxxxxx> wrote:
> On Mon, Nov 08, 2021 at 02:31:41PM +0100, Geert Uytterhoeven wrote:
> > Do you think these can actually fail?
>
> Hmm, maybe you missed the 0th message. Does this explain it:
>
> https://lore.kernel.org/r/20211108101924.15759-1-bp@xxxxxxxxx
>
> ?

Thanks, but that still doesn't explain why we need to add the check,
for something that IMHO cannot fail, in a caller that cannot do
anything in the very unlikely event that he call would ever start
to fail?

The clue is the addition of __must_check in "[PATCH v0 42/42] notifier:
Return an error when callback is already registered"
(https://lore.kernel.org/all/20211108101157.15189-43-bp@xxxxxxxxx/).

I'll reply to that one...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds