[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v0 00/42] notifiers: Return an error when callback is already registered
- To: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
- From: Borislav Petkov <bp@xxxxxxxxx>
- Date: Mon, 8 Nov 2021 15:24:39 +0100
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Ayush Sawal <ayush.sawal@xxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Rohit Maheshwari <rohitm@xxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Vinay Kumar Yadav <vinay.yadav@xxxxxxxxxxx>, alsa-devel@xxxxxxxxxxxxxxxx, bcm-kernel-feedback-list@xxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-clk@xxxxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, linux-edac@xxxxxxxxxxxxxxx, linux-fbdev@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-iio@xxxxxxxxxxxxxxx, linux-leds@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-remoteproc@xxxxxxxxxxxxxxx, linux-renesas-soc@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-usb@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx, rcu@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 08 Nov 2021 14:24:57 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Nov 08, 2021 at 09:17:03AM -0500, Alan Stern wrote:
> What reason is there for moving the check into the callers? It seems
> like pointless churn. Why not add the error return code, change the
> WARN to pr_warn, and leave the callers as they are? Wouldn't that end
> up having exactly the same effect?
>
> For that matter, what sort of remedial action can a caller take if the
> return code is -EEXIST? Is there any point in forcing callers to check
> the return code if they can't do anything about it?
See my reply to Geert from just now:
https://lore.kernel.org/r/YYkyUEqcsOwQMb1S@xxxxxxx
I guess I can add another indirection to notifier_chain_register() and
avoid touching all the call sites.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
|