mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: "Vincent Stehlé" <vincent.stehle@laposte.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memory hotplug: fix warnings
Date: Tue, 30 Apr 2013 09:29:19 -0700	[thread overview]
Message-ID: <20130430092919.a9ab7108.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1304300916500.10368@chino.kir.corp.google.com>

On Tue, 30 Apr 2013 09:17:11 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:

> On Tue, 30 Apr 2013, Vincent Stehl__ wrote:
> 
> > diff --git a/include/linux/memory.h b/include/linux/memory.h
> > index 73817af..85c31a8 100644
> > --- a/include/linux/memory.h
> > +++ b/include/linux/memory.h
> > @@ -137,7 +137,7 @@ enum mem_add_context { BOOT, HOTPLUG };
> >  #define register_hotmemory_notifier(nb)		register_memory_notifier(nb)
> >  #define unregister_hotmemory_notifier(nb) 	unregister_memory_notifier(nb)
> >  #else
> > -#define hotplug_memory_notifier(fn, pri)	(0)
> > +#define hotplug_memory_notifier(fn, pri)	({ 0; })
> >  /* These aren't inline functions due to a GCC bug. */
> >  #define register_hotmemory_notifier(nb)    ({ (void)(nb); 0; })
> >  #define unregister_hotmemory_notifier(nb)  ({ (void)(nb); })
> 
> You can't use the standard do {} while (0)?

register_memory_notifier() (and hence hotplug_memory_notifier())
returns an errno.  Which nobody bothers checking.

  reply	other threads:[~2013-04-30 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30  8:31 Vincent Stehlé
2013-04-30 16:17 ` David Rientjes
2013-04-30 16:29   ` Andrew Morton [this message]
2013-04-30 16:54     ` David Rientjes
2013-04-30 17:03       ` Andrew Morton

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=20130430092919.a9ab7108.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=vincent.stehle@laposte.net \
    /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

all inboxes | Powered by JetHome®