From: Borislav Petkov <bp@alien8.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Arnd Bergmann <arnd@arndb.de>,
Ayush Sawal <ayush.sawal@chelsio.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rohit Maheshwari <rohitm@chelsio.com>,
Steven Rostedt <rostedt@goodmis.org>,
Vinay Kumar Yadav <vinay.yadav@chelsio.com>,
ALSA Development Mailing List <alsa-devel@alsa-project.org>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
intel-gvt-dev@lists.freedesktop.org,
alpha <linux-alpha@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
linux-clk <linux-clk@vger.kernel.org>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
linux-edac@vger.kernel.org, Linux
Subject: Re: [PATCH v0 42/42] notifier: Return an error when callback is already registered
Date: Mon, 8 Nov 2021 16:58:57 +0100 [thread overview]
Message-ID: <YYlJQYLiIrhjwOmT@zn.tnic> (raw)
In-Reply-To: <CAMuHMdXiBEQyEXJagSfpH44hxVA2t0sDH7B7YubLGHrb2MJLLA@mail.gmail.com>
On Mon, Nov 08, 2021 at 04:25:47PM +0100, Geert Uytterhoeven wrote:
> I'm not against returning proper errors codes. I'm against forcing
> callers to check things that cannot fail and to add individual error
> printing to each and every caller.
If you're against checking things at the callers, then the registration
function should be void. IOW, those APIs are not optimally designed atm.
> Note that in other areas, we are moving in the other direction,
> to a centralized printing of error messages, cfr. e.g. commit
> 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to
> platform_get_irq*()").
Yes, thus my other idea to add a lower level __notifier_chain_register()
to do the checking.
I'll see if I can convert those notifier registration functions to
return void, in the process. But let's see what the others think first.
Thanks for taking the time.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2021-11-08 15:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211108101157.15189-1-bp@alien8.de>
2021-11-08 10:11 ` [PATCH v0 26/42] alpha: Check notifier registration return value Borislav Petkov
2021-11-08 10:11 ` [PATCH v0 42/42] notifier: Return an error when callback is already registered Borislav Petkov
2021-11-08 14:07 ` Geert Uytterhoeven
2021-11-08 14:21 ` Borislav Petkov
2021-11-08 15:25 ` Geert Uytterhoeven
2021-11-08 15:58 ` Borislav Petkov [this message]
2021-11-08 16:12 ` Geert Uytterhoeven
2021-11-08 16:21 ` Borislav Petkov
2021-11-08 20:59 ` Alan Stern
2021-11-08 21:18 ` Borislav Petkov
2021-11-08 10:19 ` [PATCH v0 00/42] notifiers: " Borislav Petkov
[not found] ` <20211108101924.15759-1-bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
2021-11-08 14:17 ` Alan Stern
2021-11-08 14:24 ` Borislav Petkov
2021-11-08 14:35 ` Borislav Petkov
2021-11-08 16:23 ` Steven Rostedt
2021-11-08 16:29 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YYlJQYLiIrhjwOmT@zn.tnic \
--to=bp@alien8.de \
--cc=alsa-devel@alsa-project.org \
--cc=arnd@arndb.de \
--cc=ayush.sawal@chelsio.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rohitm@chelsio.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=vinay.yadav@chelsio.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox