public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Squash hotplug warnings
@ 2005-11-14 19:37 Andy Whitcroft
  2005-11-14 19:37 ` [PATCH 1/4] __add_section remove unused pgdat definition Andy Whitcroft
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Andy Whitcroft @ 2005-11-14 19:37 UTC (permalink / raw)
  To: akpm; +Cc: apw, kravetz, haveblue, lhms-devel, linux-kernel

Following this mail are 4 small patches cleaning up some Warnings
introduced in the merge of the hotplug code:

	__add_section remove unused pgdat definition
	register_ and unregister_memory_notifier should be global
	register_memory should be global
	memory_hotplug_name should be const

These are against 2.6.14-mm2.  Please consider for -mm.

-apw

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

* [PATCH 1/4] __add_section remove unused pgdat definition
  2005-11-14 19:37 [PATCH 0/4] Squash hotplug warnings Andy Whitcroft
@ 2005-11-14 19:37 ` Andy Whitcroft
  2005-11-14 19:37 ` [PATCH 2/4] register_ and unregister_memory_notifier should be global Andy Whitcroft
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Andy Whitcroft @ 2005-11-14 19:37 UTC (permalink / raw)
  To: akpm; +Cc: apw, kravetz, haveblue, lhms-devel, linux-kernel

__add_section defines an unused pointer to the zones pgdat.  Remove
this definition.  This fixes a compile warning.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 memory_hotplug.c |    1 -
 1 file changed, 1 deletion(-)
diff -upN reference/mm/memory_hotplug.c current/mm/memory_hotplug.c
--- reference/mm/memory_hotplug.c
+++ current/mm/memory_hotplug.c
@@ -42,7 +42,6 @@ extern int sparse_add_one_section(struct
 				  int nr_pages);
 static int __add_section(struct zone *zone, unsigned long phys_start_pfn)
 {
-	struct pglist_data *pgdat = zone->zone_pgdat;
 	int nr_pages = PAGES_PER_SECTION;
 	int ret;
 

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

* [PATCH 2/4] register_ and unregister_memory_notifier should be global
  2005-11-14 19:37 [PATCH 0/4] Squash hotplug warnings Andy Whitcroft
  2005-11-14 19:37 ` [PATCH 1/4] __add_section remove unused pgdat definition Andy Whitcroft
@ 2005-11-14 19:37 ` Andy Whitcroft
  2005-11-14 23:23   ` Andrew Morton
  2005-11-14 19:37 ` [PATCH 3/4] register_memory " Andy Whitcroft
  2005-11-14 19:37 ` [PATCH 4/4] memory_hotplug_name should be const Andy Whitcroft
  3 siblings, 1 reply; 8+ messages in thread
From: Andy Whitcroft @ 2005-11-14 19:37 UTC (permalink / raw)
  To: akpm; +Cc: apw, kravetz, haveblue, lhms-devel, linux-kernel

Both register_memory_notifer and unregister_memory_notifier are global
and declared so in linux.h.  Update the HOTPLUG specific definitions
to match.  This fixes a compile warning when HOTPLUG is enabled.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 memory.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff -upN reference/drivers/base/memory.c current/drivers/base/memory.c
--- reference/drivers/base/memory.c
+++ current/drivers/base/memory.c
@@ -50,12 +50,12 @@ static struct kset_hotplug_ops memory_ho
 
 static struct notifier_block *memory_chain;
 
-static int register_memory_notifier(struct notifier_block *nb)
+int register_memory_notifier(struct notifier_block *nb)
 {
         return notifier_chain_register(&memory_chain, nb);
 }
 
-static void unregister_memory_notifier(struct notifier_block *nb)
+void unregister_memory_notifier(struct notifier_block *nb)
 {
         notifier_chain_unregister(&memory_chain, nb);
 }

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

* [PATCH 3/4] register_memory should be global
  2005-11-14 19:37 [PATCH 0/4] Squash hotplug warnings Andy Whitcroft
  2005-11-14 19:37 ` [PATCH 1/4] __add_section remove unused pgdat definition Andy Whitcroft
  2005-11-14 19:37 ` [PATCH 2/4] register_ and unregister_memory_notifier should be global Andy Whitcroft
@ 2005-11-14 19:37 ` Andy Whitcroft
  2005-11-14 19:37 ` [PATCH 4/4] memory_hotplug_name should be const Andy Whitcroft
  3 siblings, 0 replies; 8+ messages in thread
From: Andy Whitcroft @ 2005-11-14 19:37 UTC (permalink / raw)
  To: akpm; +Cc: apw, kravetz, haveblue, lhms-devel, linux-kernel

register_memory is global and declared so in linux.h.  Update the
HOTPLUG specific definition to match.  This fixes a compile warning
when HOTPLUG is enabled.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 memory.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff -upN reference/drivers/base/memory.c current/drivers/base/memory.c
--- reference/drivers/base/memory.c
+++ current/drivers/base/memory.c
@@ -63,8 +63,7 @@ void unregister_memory_notifier(struct n
 /*
  * register_memory - Setup a sysfs device for a memory block
  */
-static int
-register_memory(struct memory_block *memory, struct mem_section *section,
+int register_memory(struct memory_block *memory, struct mem_section *section,
 		struct node *root)
 {
 	int error;

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

* [PATCH 4/4] memory_hotplug_name should be const
  2005-11-14 19:37 [PATCH 0/4] Squash hotplug warnings Andy Whitcroft
                   ` (2 preceding siblings ...)
  2005-11-14 19:37 ` [PATCH 3/4] register_memory " Andy Whitcroft
@ 2005-11-14 19:37 ` Andy Whitcroft
  3 siblings, 0 replies; 8+ messages in thread
From: Andy Whitcroft @ 2005-11-14 19:37 UTC (permalink / raw)
  To: akpm; +Cc: apw, kravetz, haveblue, lhms-devel, linux-kernel

The hotplug ops name entry for memory (memory_hotplug_name) should
be const.  This fixes a compiler warning when HOTPLUG is enabled.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff -upN reference/drivers/base/memory.c current/drivers/base/memory.c
--- reference/drivers/base/memory.c
+++ current/drivers/base/memory.c
@@ -30,7 +30,7 @@ static struct sysdev_class memory_sysdev
 };
 EXPORT_SYMBOL(memory_sysdev_class);
 
-static char *memory_hotplug_name(struct kset *kset, struct kobject *kobj)
+static const char *memory_hotplug_name(struct kset *kset, struct kobject *kobj)
 {
 	return MEMORY_CLASS_NAME;
 }

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

* Re: [PATCH 2/4] register_ and unregister_memory_notifier should be global
  2005-11-14 19:37 ` [PATCH 2/4] register_ and unregister_memory_notifier should be global Andy Whitcroft
@ 2005-11-14 23:23   ` Andrew Morton
  2005-11-15  0:30     ` mike kravetz
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2005-11-14 23:23 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: apw, kravetz, haveblue, lhms-devel, linux-kernel

Andy Whitcroft <apw@shadowen.org> wrote:
>
> Both register_memory_notifer and unregister_memory_notifier are global
> and declared so in linux.h.  Update the HOTPLUG specific definitions
> to match.  This fixes a compile warning when HOTPLUG is enabled.
> 

There is no linux.h and I can find no .h file which declares
register_memory_notifier().  Please clarify?


> ---
>  memory.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> diff -upN reference/drivers/base/memory.c current/drivers/base/memory.c
> --- reference/drivers/base/memory.c
> +++ current/drivers/base/memory.c
> @@ -50,12 +50,12 @@ static struct kset_hotplug_ops memory_ho
>  
>  static struct notifier_block *memory_chain;
>  
> -static int register_memory_notifier(struct notifier_block *nb)
> +int register_memory_notifier(struct notifier_block *nb)
>  {
>          return notifier_chain_register(&memory_chain, nb);
>  }
>  
> -static void unregister_memory_notifier(struct notifier_block *nb)
> +void unregister_memory_notifier(struct notifier_block *nb)
>  {
>          notifier_chain_unregister(&memory_chain, nb);
>  }

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

* Re: [PATCH 2/4] register_ and unregister_memory_notifier should be global
  2005-11-14 23:23   ` Andrew Morton
@ 2005-11-15  0:30     ` mike kravetz
  2005-11-15  1:17       ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: mike kravetz @ 2005-11-15  0:30 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Andy Whitcroft, haveblue, lhms-devel, linux-kernel

On Mon, Nov 14, 2005 at 03:23:16PM -0800, Andrew Morton wrote:
> Andy Whitcroft <apw@shadowen.org> wrote:
> >
> > Both register_memory_notifer and unregister_memory_notifier are global
> > and declared so in linux.h.  Update the HOTPLUG specific definitions
> > to match.  This fixes a compile warning when HOTPLUG is enabled.
> 
> There is no linux.h and I can find no .h file which declares
> register_memory_notifier().  Please clarify?

I'm pretty sure Andy meant to say <linux/memory.h> not linux.h.

-- 
Mike

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

* Re: [PATCH 2/4] register_ and unregister_memory_notifier should be global
  2005-11-15  0:30     ` mike kravetz
@ 2005-11-15  1:17       ` Andrew Morton
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2005-11-15  1:17 UTC (permalink / raw)
  To: mike kravetz; +Cc: apw, haveblue, lhms-devel, linux-kernel

mike kravetz <kravetz@us.ibm.com> wrote:
>
> On Mon, Nov 14, 2005 at 03:23:16PM -0800, Andrew Morton wrote:
> > Andy Whitcroft <apw@shadowen.org> wrote:
> > >
> > > Both register_memory_notifer and unregister_memory_notifier are global
> > > and declared so in linux.h.  Update the HOTPLUG specific definitions
> > > to match.  This fixes a compile warning when HOTPLUG is enabled.
> > 
> > There is no linux.h and I can find no .h file which declares
> > register_memory_notifier().  Please clarify?
> 
> I'm pretty sure Andy meant to say <linux/memory.h> not linux.h.
> 

hm, OK, and I just lost my grep license.  Thanks.

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

end of thread, other threads:[~2005-11-15  1:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 19:37 [PATCH 0/4] Squash hotplug warnings Andy Whitcroft
2005-11-14 19:37 ` [PATCH 1/4] __add_section remove unused pgdat definition Andy Whitcroft
2005-11-14 19:37 ` [PATCH 2/4] register_ and unregister_memory_notifier should be global Andy Whitcroft
2005-11-14 23:23   ` Andrew Morton
2005-11-15  0:30     ` mike kravetz
2005-11-15  1:17       ` Andrew Morton
2005-11-14 19:37 ` [PATCH 3/4] register_memory " Andy Whitcroft
2005-11-14 19:37 ` [PATCH 4/4] memory_hotplug_name should be const Andy Whitcroft

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