Commit 14a02530 authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by H. Peter Anvin

x86, mce: trivial clean up for mce.c

This fixs following checkpatch warnings:

WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
+#include <asm/uaccess.h>

WARNING: Use #include <linux/smp.h> instead of <asm/smp.h>
+#include <asm/smp.h>

WARNING: line over 80 characters
+                               set_bit(MCE_OVERFLOW, (unsigned long *)&mcelog.flags);

WARNING: braces {} are not necessary for any arm of this statement
+       if (mce_notify_user()) {
[...]
+       } else {
[...]
Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent cc3aec52
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/kobject.h> #include <linux/kobject.h>
#include <linux/uaccess.h>
#include <linux/kdebug.h> #include <linux/kdebug.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/percpu.h> #include <linux/percpu.h>
...@@ -27,14 +28,13 @@ ...@@ -27,14 +28,13 @@
#include <linux/kmod.h> #include <linux/kmod.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/uaccess.h>
#include <asm/idle.h> #include <asm/idle.h>
#include <asm/mce.h> #include <asm/mce.h>
#include <asm/msr.h> #include <asm/msr.h>
#include <asm/smp.h>
#include "mce.h" #include "mce.h"
...@@ -125,7 +125,8 @@ void mce_log(struct mce *mce) ...@@ -125,7 +125,8 @@ void mce_log(struct mce *mce)
* interesting ones: * interesting ones:
*/ */
if (entry >= MCE_LOG_LEN) { if (entry >= MCE_LOG_LEN) {
set_bit(MCE_OVERFLOW, (unsigned long *)&mcelog.flags); set_bit(MCE_OVERFLOW,
(unsigned long *)&mcelog.flags);
return; return;
} }
/* Old left over entry. Skip: */ /* Old left over entry. Skip: */
...@@ -556,11 +557,10 @@ static void mcheck_timer(unsigned long data) ...@@ -556,11 +557,10 @@ static void mcheck_timer(unsigned long data)
* polling interval, otherwise increase the polling interval. * polling interval, otherwise increase the polling interval.
*/ */
n = &__get_cpu_var(next_interval); n = &__get_cpu_var(next_interval);
if (mce_notify_user()) { if (mce_notify_user())
*n = max(*n/2, HZ/100); *n = max(*n/2, HZ/100);
} else { else
*n = min(*n*2, (int)round_jiffies_relative(check_interval*HZ)); *n = min(*n*2, (int)round_jiffies_relative(check_interval*HZ));
}
t->expires = jiffies + *n; t->expires = jiffies + *n;
add_timer(t); add_timer(t);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment