Re: replace "memset(...,0,PAGE_SIZE)" calls with "clear_page()"?

Previous thread: Re: replace "memset(...,0,PAGE_SIZE)" calls with "clear_page()"? by Robert P. J. Day on Monday, January 1, 2007 - 4:33 am. (5 messages)

Next thread: Re: [PATCH] net/core/flow.c: compare data with memcmp by David Miller on Monday, January 1, 2007 - 4:49 am. (2 messages)
To: <tglx@...>, <mingo@...>, <hpa@...>, <macro@...>
Cc: <linux-kernel@...>, <gorcunov@...>
Date: Wednesday, December 31, 1969 - 8:00 pm

This patch does check if CPU is being recongnized
before call the unreserve(). Since enable_lapic_nmi_watchdog()
does have such a check the same is make sense here too
in a sake of code consistency (but nothing more).

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

Index: linux-2.6.git/arch/x86/kernel/cpu/perfctr-watchdog.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/cpu/perfctr-watchdog.c 2008-06-03 20:48:26.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/cpu/perfctr-watchdog.c 2008-06-03 21:26:00.000000000 +0400
@@ -181,7 +181,9 @@ void disable_lapic_nmi_watchdog(void)
return;

on_each_cpu(stop_apic_nmi_watchdog, NULL, 0, 1);
- wd_ops->unreserve();
+
+ if (wd_ops)
+ wd_ops->unreserve();

BUG_ON(atomic_read(&nmi_active) != 0);
}

--
--

To: Folkert van Heusden <folkert@...>
Cc: Robert P. J. Day <rpjday@...>, Arjan van de Ven <arjan@...>, Denis Vlasenko <vda.linux@...>, Linux kernel mailing list <linux-kernel@...>
Date: Monday, January 1, 2007 - 4:42 am

For what purpose? CodingStyle is not about documenting usage constraints
for every minor part of the kernel. If someone intends to use an API,
it's up to them to figure out the semantics for doing so. Let's not
confuse common sense with style.
-

To: Paul Mundt <lethal@...>
Cc: Folkert van Heusden <folkert@...>, Robert P. J. Day <rpjday@...>, Arjan van de Ven <arjan@...>, Denis Vlasenko <vda.linux@...>, Linux kernel mailing list <linux-kernel@...>
Date: Monday, January 1, 2007 - 1:09 pm

I agree, these aren't CodingStyle material. They could make sense
in some other doc, either MM/VM-related or more general.

I've often wanted a somewhat introductory doc about Linux environmental
assumptions (memory model, pointers/longs, data cleared to 0,
many other items that I don't have on my fingertips).

---
~Randy
-

Previous thread: Re: replace "memset(...,0,PAGE_SIZE)" calls with "clear_page()"? by Robert P. J. Day on Monday, January 1, 2007 - 4:33 am. (5 messages)

Next thread: Re: [PATCH] net/core/flow.c: compare data with memcmp by David Miller on Monday, January 1, 2007 - 4:49 am. (2 messages)