lkml.org 
[lkml]   [2013]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] memory hotplug: fix warnings
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.


\
 
 \ /
  Last update: 2013-04-30 19:01    [W:0.056 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site