Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] Documentation / CPU hotplug: Fix the typo in example code

0 views
Skip to first unread message

Sangjung Woo

unread,
Jan 15, 2014, 12:20:02 AM1/15/14
to
As the notifier_block name (i.e. foobar_cpu_notifer) is different from
the parameter (i.e.foobar_cpu_notifier) of register function, that is
definitely error and it also makes readers confused.

Signed-off-by: Sangjung Woo <sangju...@samsung.com>
---
Documentation/cpu-hotplug.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 8cb9938..be675d2 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -285,7 +285,7 @@ A: This is what you would need in your kernel code to receive notifications.
return NOTIFY_OK;
}

- static struct notifier_block foobar_cpu_notifer =
+ static struct notifier_block foobar_cpu_notifier =
{
.notifier_call = foobar_cpu_callback,
};
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Srivatsa S. Bhat

unread,
Jan 15, 2014, 1:00:01 AM1/15/14
to
On 01/15/2014 10:40 AM, Sangjung Woo wrote:
> As the notifier_block name (i.e. foobar_cpu_notifer) is different from
> the parameter (i.e.foobar_cpu_notifier) of register function, that is
> definitely error and it also makes readers confused.
>
> Signed-off-by: Sangjung Woo <sangju...@samsung.com>

Reviewed-by: Srivatsa S. Bhat <srivat...@linux.vnet.ibm.com>

Regards,
Srivatsa S. Bhat

> ---
> Documentation/cpu-hotplug.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
> index 8cb9938..be675d2 100644
> --- a/Documentation/cpu-hotplug.txt
> +++ b/Documentation/cpu-hotplug.txt
> @@ -285,7 +285,7 @@ A: This is what you would need in your kernel code to receive notifications.
> return NOTIFY_OK;
> }
>
> - static struct notifier_block foobar_cpu_notifer =
> + static struct notifier_block foobar_cpu_notifier =
> {
> .notifier_call = foobar_cpu_callback,
> };
>

--

Andrew Morton

unread,
Jan 15, 2014, 6:40:02 PM1/15/14
to
On Wed, 15 Jan 2014 14:10:26 +0900 Sangjung Woo <sangju...@samsung.com> wrote:

> As the notifier_block name (i.e. foobar_cpu_notifer) is different from
> the parameter (i.e.foobar_cpu_notifier) of register function, that is
> definitely error and it also makes readers confused.
>

btw, that document doesn't mention hotcpu_notifier(), which is actually
the preferred means of registration. Because it causes all the hotplug
code to be elided when CONFIG_HOTPLUG_CPU=n, without using ifdefs.
0 new messages