public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: X86 ML <x86@kernel.org>,
	Valentin Schneider <valentin.schneider@arm.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] notifier: Return an error when a callback has already been registered
Date: Thu, 2 Dec 2021 15:23:36 +0100	[thread overview]
Message-ID: <YajW6LRVJi2IEHlU@zn.tnic> (raw)
In-Reply-To: <20211202141630.rdkrtrltxhzdqtyb@linutronix.de>

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

  reply	other threads:[~2021-12-02 14:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 13:36 [PATCH] notifier: Return an error when a callback has already been registered Borislav Petkov
2021-12-02 14:16 ` Sebastian Andrzej Siewior
2021-12-02 14:23   ` Borislav Petkov [this message]
2021-12-02 14:31     ` Sebastian Andrzej Siewior
2021-12-02 14:46       ` Borislav Petkov
2021-12-02 15:41 ` Alan Stern
2021-12-02 15:56   ` Borislav Petkov
2021-12-23 15:31 ` [PATCH -v2] " Borislav Petkov
2021-12-23 18:16   ` Sebastian Andrzej Siewior
2021-12-23 20:00   ` Alan Stern
2021-12-29  9:58   ` [tip: core/core] " tip-bot2 for 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=YajW6LRVJi2IEHlU@zn.tnic \
    --to=bp@alien8.de \
    --cc=bigeasy@linutronix.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rostedt@goodmis.org \
    --cc=stern@rowland.harvard.edu \
    --cc=valentin.schneider@arm.com \
    --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