From: Borislav Petkov <bp@alien8.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
the arch/x86 maintainers <x86@kernel.org>,
Linux-sh list <linux-sh@vger.kernel.org>,
linux-iio@vger.kernel.org,
"open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM"
<linux-remoteproc@vger.kernel.org>,
linux-hyperv@vger.kernel.org,
"open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
Ayush Sawal <ayush.sawal@chelsio.com>,
sparclinux <sparclinux@vger.kernel.org>,
linux-clk <linux-clk@vger.kernel.org>,
linux-leds <linux-leds@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
scsi <linux-scsi@vger.kernel.org>,
Rohit Maheshwari <rohitm@chelsio.com>,
linux-staging@lists.linux.dev,
Geert Uytterhoeven <geert@linux-m68k.org>,
openipmi-developer@lists.sourceforge.net,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
open list:TENSILICA XTENSA PORT (
Subject: Re: [PATCH v0 42/42] notifier: Return an error when callback is already registered
Date: Mon, 8 Nov 2021 22:18:47 +0100 [thread overview]
Message-ID: <YYmUN69Y7z9xITas@zn.tnic> (raw)
In-Reply-To: <20211108205926.GA1678880@rowland.harvard.edu>
On Mon, Nov 08, 2021 at 03:59:26PM -0500, Alan Stern wrote:
> Is there really any reason for returning an error code? For example, is
> it anticipated that at some point in the future these registration calls
> might fail?
>
> Currently, the only reason for failing...
Right, I believe with not making it return void we're leaving the door
open for some, *hypothetical* future return values if we decide we need
to return them too, at some point.
Yes, I can't think of another fact to state besides that the callback
was already registered or return success but who knows what we wanna do
in the future...
And so if we change them all to void now, I think it'll be a lot more
churn to switch back to returning a non-void value and having the
callers who choose to handle that value, do so again.
So, long story short, keeping the retval - albeit not very useful right
now - is probably easier.
I hope I'm making some sense here.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2021-11-08 21:18 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
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 [this message]
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=YYmUN69Y7z9xITas@zn.tnic \
--to=bp@alien8.de \
--cc=alsa-devel@alsa-project.org \
--cc=ayush.sawal@chelsio.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=geert@linux-m68k.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=rohitm@chelsio.com \
--cc=sparclinux@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=x86@kernel.org \
/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