* [PATCH -tip 2/3] x86, mce: Cleanup param parser
@ 2009-03-26 8:39 Hidetoshi Seto
2009-03-26 9:35 ` Andi Kleen
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Hidetoshi Seto @ 2009-03-26 8:39 UTC (permalink / raw)
To: linux-kernel; +Cc: Andi Kleen, Ingo Molnar
- Fix the comment formatting.
- The error path does not return 0, and printk lacks level and "\n".
- Move __setup("nomce") next to mcheck_disable().
- Improve readability etc.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/mcheck/mce_64.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 863f895..33d612e 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -838,25 +838,29 @@ static int __init mcheck_disable(char *str)
mce_dont_init = 1;
return 1;
}
+__setup("nomce", mcheck_disable);
-/* mce=off disables machine check.
- mce=TOLERANCELEVEL (number, see above)
- mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
- mce=nobootlog Don't log MCEs from before booting. */
+/*
+ * mce=off disables machine check
+ * mce=TOLERANCELEVEL (number, see above)
+ * mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
+ * mce=nobootlog Don't log MCEs from before booting.
+ */
static int __init mcheck_enable(char *str)
{
if (!strcmp(str, "off"))
mce_dont_init = 1;
- else if (!strcmp(str, "bootlog") || !strcmp(str,"nobootlog"))
- mce_bootlog = str[0] == 'b';
+ else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog"))
+ mce_bootlog = (str[0] == 'b');
else if (isdigit(str[0]))
get_option(&str, &tolerant);
- else
- printk("mce= argument %s ignored. Please use /sys", str);
+ else {
+ printk(KERN_INFO "mce= argument %s ignored. Please use /sys\n",
+ str);
+ return 0;
+ }
return 1;
}
-
-__setup("nomce", mcheck_disable);
__setup("mce=", mcheck_enable);
/*
--
1.6.2.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH -tip 2/3] x86, mce: Cleanup param parser
2009-03-26 8:39 [PATCH -tip 2/3] x86, mce: Cleanup param parser Hidetoshi Seto
@ 2009-03-26 9:35 ` Andi Kleen
2009-03-27 9:45 ` Hidetoshi Seto
2009-03-28 21:29 ` [tip:x86/mce2] " Hidetoshi Seto
2009-05-29 18:54 ` [tip:x86/mce3] " tip-bot for Hidetoshi Seto
2 siblings, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2009-03-26 9:35 UTC (permalink / raw)
To: Hidetoshi Seto; +Cc: linux-kernel, Ingo Molnar
Hidetoshi Seto wrote:
> - Fix the comment formatting.
> - The error path does not return 0, and printk lacks level and "\n".
> - Move __setup("nomce") next to mcheck_disable().
> - Improve readability etc.
Looks good.
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -tip 2/3] x86, mce: Cleanup param parser
2009-03-26 9:35 ` Andi Kleen
@ 2009-03-27 9:45 ` Hidetoshi Seto
2009-03-27 11:34 ` Andi Kleen
0 siblings, 1 reply; 6+ messages in thread
From: Hidetoshi Seto @ 2009-03-27 9:45 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel, Ingo Molnar
Andi Kleen wrote:
> Hidetoshi Seto wrote:
>> - Fix the comment formatting.
>> - The error path does not return 0, and printk lacks level and "\n".
>> - Move __setup("nomce") next to mcheck_disable().
>> - Improve readability etc.
>
> Looks good.
Thank you for reviewing!
This cleanup can stand alone, so could you apply this onto -tip?
# Or would you request me to resend it with subject stripped "2/3"?
Thanks,
H.Seto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -tip 2/3] x86, mce: Cleanup param parser
2009-03-27 9:45 ` Hidetoshi Seto
@ 2009-03-27 11:34 ` Andi Kleen
0 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2009-03-27 11:34 UTC (permalink / raw)
To: Hidetoshi Seto; +Cc: linux-kernel, Ingo Molnar
Hidetoshi Seto wrote:
> Andi Kleen wrote:
>> Hidetoshi Seto wrote:
>>> - Fix the comment formatting.
>>> - The error path does not return 0, and printk lacks level and "\n".
>>> - Move __setup("nomce") next to mcheck_disable().
>>> - Improve readability etc.
>> Looks good.
>
> Thank you for reviewing!
>
> This cleanup can stand alone, so could you apply this onto -tip?
> # Or would you request me to resend it with subject stripped "2/3"?
I can add it into my pile. I don't have direct access to tip
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tip:x86/mce2] x86, mce: Cleanup param parser
2009-03-26 8:39 [PATCH -tip 2/3] x86, mce: Cleanup param parser Hidetoshi Seto
2009-03-26 9:35 ` Andi Kleen
@ 2009-03-28 21:29 ` Hidetoshi Seto
2009-05-29 18:54 ` [tip:x86/mce3] " tip-bot for Hidetoshi Seto
2 siblings, 0 replies; 6+ messages in thread
From: Hidetoshi Seto @ 2009-03-28 21:29 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, seto.hidetoshi, ak, tglx, mingo
Commit-ID: 38719db5cf9b8b22bbe2731d736bf271c803e0b0
Gitweb: http://git.kernel.org/tip/38719db5cf9b8b22bbe2731d736bf271c803e0b0
Author: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
AuthorDate: Thu, 26 Mar 2009 17:39:20 +0900
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 28 Mar 2009 13:12:55 +0100
x86, mce: Cleanup param parser
Impact: cleanup
- Fix the comment formatting.
- The error path does not return 0, and printk lacks level and "\n".
- Move __setup("nomce") next to mcheck_disable().
- Improve readability etc.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <49CB3F38.7090703@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/mcheck/mce_64.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index ca14604..9bf52bd 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -838,25 +838,29 @@ static int __init mcheck_disable(char *str)
mce_dont_init = 1;
return 1;
}
+__setup("nomce", mcheck_disable);
-/* mce=off disables machine check.
- mce=TOLERANCELEVEL (number, see above)
- mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
- mce=nobootlog Don't log MCEs from before booting. */
+/*
+ * mce=off disables machine check
+ * mce=TOLERANCELEVEL (number, see above)
+ * mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
+ * mce=nobootlog Don't log MCEs from before booting.
+ */
static int __init mcheck_enable(char *str)
{
if (!strcmp(str, "off"))
mce_dont_init = 1;
- else if (!strcmp(str, "bootlog") || !strcmp(str,"nobootlog"))
- mce_bootlog = str[0] == 'b';
+ else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog"))
+ mce_bootlog = (str[0] == 'b');
else if (isdigit(str[0]))
get_option(&str, &tolerant);
- else
- printk("mce= argument %s ignored. Please use /sys", str);
+ else {
+ printk(KERN_INFO "mce= argument %s ignored. Please use /sys\n",
+ str);
+ return 0;
+ }
return 1;
}
-
-__setup("nomce", mcheck_disable);
__setup("mce=", mcheck_enable);
/*
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:x86/mce3] x86, mce: Cleanup param parser
2009-03-26 8:39 [PATCH -tip 2/3] x86, mce: Cleanup param parser Hidetoshi Seto
2009-03-26 9:35 ` Andi Kleen
2009-03-28 21:29 ` [tip:x86/mce2] " Hidetoshi Seto
@ 2009-05-29 18:54 ` tip-bot for Hidetoshi Seto
2 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Hidetoshi Seto @ 2009-05-29 18:54 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, seto.hidetoshi, ak, tglx, mingo
Commit-ID: 13503fa9137d9708d52214e9506c671dbf2fbdce
Gitweb: http://git.kernel.org/tip/13503fa9137d9708d52214e9506c671dbf2fbdce
Author: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
AuthorDate: Thu, 26 Mar 2009 17:39:20 +0900
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Thu, 28 May 2009 09:24:09 -0700
x86, mce: Cleanup param parser
- Fix the comment formatting.
- The error path does not return 0, and printk lacks level and "\n".
- Move __setup("nomce") next to mcheck_disable().
- Improve readability etc.
[ Impact: cleanup ]
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <49CB3F38.7090703@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/kernel/cpu/mcheck/mce_64.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 6fb0b35..77effb5 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -839,25 +839,29 @@ static int __init mcheck_disable(char *str)
mce_dont_init = 1;
return 1;
}
+__setup("nomce", mcheck_disable);
-/* mce=off disables machine check.
- mce=TOLERANCELEVEL (number, see above)
- mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
- mce=nobootlog Don't log MCEs from before booting. */
+/*
+ * mce=off disables machine check
+ * mce=TOLERANCELEVEL (number, see above)
+ * mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
+ * mce=nobootlog Don't log MCEs from before booting.
+ */
static int __init mcheck_enable(char *str)
{
if (!strcmp(str, "off"))
mce_dont_init = 1;
- else if (!strcmp(str, "bootlog") || !strcmp(str,"nobootlog"))
- mce_bootlog = str[0] == 'b';
+ else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog"))
+ mce_bootlog = (str[0] == 'b');
else if (isdigit(str[0]))
get_option(&str, &tolerant);
- else
- printk("mce= argument %s ignored. Please use /sys", str);
+ else {
+ printk(KERN_INFO "mce= argument %s ignored. Please use /sys\n",
+ str);
+ return 0;
+ }
return 1;
}
-
-__setup("nomce", mcheck_disable);
__setup("mce=", mcheck_enable);
/*
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-05-29 18:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 8:39 [PATCH -tip 2/3] x86, mce: Cleanup param parser Hidetoshi Seto
2009-03-26 9:35 ` Andi Kleen
2009-03-27 9:45 ` Hidetoshi Seto
2009-03-27 11:34 ` Andi Kleen
2009-03-28 21:29 ` [tip:x86/mce2] " Hidetoshi Seto
2009-05-29 18:54 ` [tip:x86/mce3] " tip-bot for Hidetoshi Seto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox