public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] acpi: fix memory_hotplug externs
@ 2006-03-28 19:46 Randy.Dunlap
  2006-04-01 22:16 ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2006-03-28 19:46 UTC (permalink / raw)
  To: lkml; +Cc: akpm, linux-acpi

From: Randy Dunlap <rdunlap@xenotime.net>

Spell CONFIG option correctly so that externs work.
Fixes these warnings:
drivers/acpi/acpi_memhotplug.c:248: warning: implicit declaration of function 'add_memory'
drivers/acpi/acpi_memhotplug.c:312: warning: implicit declaration of function 'remove_memory'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 linsrc/linux-2616-mm2/include/linux/memory_hotplug.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- rddunlap.orig/linsrc/linux-2616-mm2/include/linux/memory_hotplug.h
+++ rddunlap/linsrc/linux-2616-mm2/include/linux/memory_hotplug.h
@@ -105,7 +105,7 @@ static inline int __remove_pages(struct 
 }
 
 #if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
-	|| defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE)
+	|| defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
 extern int add_memory(u64 start, u64 size);
 extern int remove_memory(u64 start, u64 size);
 #endif


---

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -mm] acpi: fix memory_hotplug externs
  2006-03-28 19:46 [PATCH -mm] acpi: fix memory_hotplug externs Randy.Dunlap
@ 2006-04-01 22:16 ` Adrian Bunk
  2006-04-02  0:08   ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2006-04-01 22:16 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: lkml, akpm, linux-acpi

On Tue, Mar 28, 2006 at 11:46:55AM -0800, Randy.Dunlap wrote:
> From: Randy Dunlap <rdunlap@xenotime.net>
> 
> Spell CONFIG option correctly so that externs work.
> Fixes these warnings:
> drivers/acpi/acpi_memhotplug.c:248: warning: implicit declaration of function 'add_memory'
> drivers/acpi/acpi_memhotplug.c:312: warning: implicit declaration of function 'remove_memory'
> 
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> ---
>  linsrc/linux-2616-mm2/include/linux/memory_hotplug.h |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> --- rddunlap.orig/linsrc/linux-2616-mm2/include/linux/memory_hotplug.h
> +++ rddunlap/linsrc/linux-2616-mm2/include/linux/memory_hotplug.h
> @@ -105,7 +105,7 @@ static inline int __remove_pages(struct 
>  }
>  
>  #if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
> -	|| defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE)
> +	|| defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
>  extern int add_memory(u64 start, u64 size);
>  extern int remove_memory(u64 start, u64 size);
>  #endif

What about simply offering the prototypes unconditionally?

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -mm] acpi: fix memory_hotplug externs
  2006-04-01 22:16 ` Adrian Bunk
@ 2006-04-02  0:08   ` Randy.Dunlap
  2006-04-02  8:56     ` [-mm patch] memory_hotplug.h: no need to #if guard the {add,remove}_memory() prototypes Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2006-04-02  0:08 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel, akpm, linux-acpi

On Sun, 2 Apr 2006 00:16:41 +0200 Adrian Bunk wrote:

> On Tue, Mar 28, 2006 at 11:46:55AM -0800, Randy.Dunlap wrote:
> > From: Randy Dunlap <rdunlap@xenotime.net>
> > 
> > Spell CONFIG option correctly so that externs work.
> > Fixes these warnings:
> > drivers/acpi/acpi_memhotplug.c:248: warning: implicit declaration of function 'add_memory'
> > drivers/acpi/acpi_memhotplug.c:312: warning: implicit declaration of function 'remove_memory'
> > 
> > Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> > ---
> >  linsrc/linux-2616-mm2/include/linux/memory_hotplug.h |    2 +-
> >  1 files changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- rddunlap.orig/linsrc/linux-2616-mm2/include/linux/memory_hotplug.h
> > +++ rddunlap/linsrc/linux-2616-mm2/include/linux/memory_hotplug.h
> > @@ -105,7 +105,7 @@ static inline int __remove_pages(struct 
> >  }
> >  
> >  #if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
> > -	|| defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE)
> > +	|| defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
> >  extern int add_memory(u64 start, u64 size);
> >  extern int remove_memory(u64 start, u64 size);
> >  #endif
> 
> What about simply offering the prototypes unconditionally?

duh, yes, that should be OK AFAIK.  Could you do that?

---
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [-mm patch] memory_hotplug.h: no need to #if guard the {add,remove}_memory() prototypes
  2006-04-02  0:08   ` Randy.Dunlap
@ 2006-04-02  8:56     ` Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2006-04-02  8:56 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-kernel, akpm, linux-acpi

On Sat, Apr 01, 2006 at 04:08:18PM -0800, Randy.Dunlap wrote:
> On Sun, 2 Apr 2006 00:16:41 +0200 Adrian Bunk wrote:
> 
> > On Tue, Mar 28, 2006 at 11:46:55AM -0800, Randy.Dunlap wrote:
> > > From: Randy Dunlap <rdunlap@xenotime.net>
> > > 
> > > Spell CONFIG option correctly so that externs work.
> > > Fixes these warnings:
> > > drivers/acpi/acpi_memhotplug.c:248: warning: implicit declaration of function 'add_memory'
> > > drivers/acpi/acpi_memhotplug.c:312: warning: implicit declaration of function 'remove_memory'
> > > 
> > > Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> > > ---
> > >  linsrc/linux-2616-mm2/include/linux/memory_hotplug.h |    2 +-
> > >  1 files changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > --- rddunlap.orig/linsrc/linux-2616-mm2/include/linux/memory_hotplug.h
> > > +++ rddunlap/linsrc/linux-2616-mm2/include/linux/memory_hotplug.h
> > > @@ -105,7 +105,7 @@ static inline int __remove_pages(struct 
> > >  }
> > >  
> > >  #if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
> > > -	|| defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE)
> > > +	|| defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
> > >  extern int add_memory(u64 start, u64 size);
> > >  extern int remove_memory(u64 start, u64 size);
> > >  #endif
> > 
> > What about simply offering the prototypes unconditionally?
> 
> duh, yes, that should be OK AFAIK.  Could you do that?

Patch below.

> ~Randy

cu
Adrian


<--  snip  -->


We don't have to #if guard prototypes.

This also fixes a bug observed by Randy Dunlap due to a misspelled 
option in the #if (I haven't investigated whether it was harmless or 
might have caused runtime corruption).

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.16-mm2-full/include/linux/memory_hotplug.h.old	2006-04-02 10:44:37.000000000 +0200
+++ linux-2.6.16-mm2-full/include/linux/memory_hotplug.h	2006-04-02 10:44:50.000000000 +0200
@@ -104,10 +104,7 @@
 	return -ENOSYS;
 }
 
-#if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
-	|| defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE)
 extern int add_memory(u64 start, u64 size);
 extern int remove_memory(u64 start, u64 size);
-#endif
 
 #endif /* __LINUX_MEMORY_HOTPLUG_H */


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-04-02  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-28 19:46 [PATCH -mm] acpi: fix memory_hotplug externs Randy.Dunlap
2006-04-01 22:16 ` Adrian Bunk
2006-04-02  0:08   ` Randy.Dunlap
2006-04-02  8:56     ` [-mm patch] memory_hotplug.h: no need to #if guard the {add,remove}_memory() prototypes Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox