summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce.c
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2009-04-14 17:26:30 +0900
committerH. Peter Anvin <hpa@zytor.com>2009-05-28 09:24:15 -0700
commit9319cec8c185e84fc5281afb6ac5d4c47a234841 (patch)
tree983c708aaa5bba2671787a886e03fe6226b1eb6a /arch/x86/kernel/cpu/mcheck/mce.c
parent8780e8e0f6b34862cdf2c62d4d2674d6bc3207db (diff)
x86, mce: use strict_strtoull
Use strict_strtoull instead of simple_strtoull. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce.c')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 8ab28368bb9..4375ffb5459 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1059,18 +1059,17 @@ static ssize_t show_bank(struct sys_device *s, struct sysdev_attribute *attr,
}
static ssize_t set_bank(struct sys_device *s, struct sysdev_attribute *attr,
- const char *buf, size_t siz)
+ const char *buf, size_t size)
{
- char *end;
- u64 new = simple_strtoull(buf, &end, 0);
+ u64 new;
- if (end == buf)
+ if (strict_strtoull(buf, 0, &new) < 0)
return -EINVAL;
bank[attr - bank_attrs] = new;
mce_restart();
- return end-buf;
+ return size;
}
static ssize_t