2005-11-14 19:38:39

by Andy Whitcroft

[permalink] [raw]
Subject: [PATCH 2/4] register_ and unregister_memory_notifier should be global

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 <[email protected]>
---
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);
}


2005-11-14 23:23:10

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 2/4] register_ and unregister_memory_notifier should be global

Andy Whitcroft <[email protected]> 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);
> }

2005-11-15 00:30:38

by Mike Kravetz

[permalink] [raw]
Subject: Re: [PATCH 2/4] register_ and unregister_memory_notifier should be global

On Mon, Nov 14, 2005 at 03:23:16PM -0800, Andrew Morton wrote:
> Andy Whitcroft <[email protected]> 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

2005-11-15 01:17:37

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 2/4] register_ and unregister_memory_notifier should be global

mike kravetz <[email protected]> wrote:
>
> On Mon, Nov 14, 2005 at 03:23:16PM -0800, Andrew Morton wrote:
> > Andy Whitcroft <[email protected]> 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.