[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YajW6LRVJi2IEHlU@zn.tnic>
Date: Thu, 2 Dec 2021 15:23:36 +0100
From: Borislav Petkov <bp@...en8.de>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: X86 ML <x86@...nel.org>,
Valentin Schneider <valentin.schneider@....com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Alan Stern <stern@...land.harvard.edu>,
Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] notifier: Return an error when a callback has already
been registered
On Thu, Dec 02, 2021 at 03:16:30PM +0100, Sebastian Andrzej Siewior wrote:
> > while ((*nl) != NULL) {
> > - if (unlikely((*nl) == n)) {
> > - WARN(1, "double register detected");
> > - return 0;
>
> This could be s/0/-EEXIST/ or do I miss something?
It is...
> I appreciate the updated warning with %ps!
Send peterz your thanks for that. :-)
> > - }
> > + if (unlikely((*nl) == n))
> > + return -EEXIST;
^^^^^^^^^^^^^^^
... right here.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists