Skip to content

Commit

Permalink
x86, microcode: microcode_core.c simple_strtoul cleanup
Browse files Browse the repository at this point in the history
Change reload_for_cpu() in kernel/microcode_core.c to call kstrtoul()
instead of calling obsoleted simple_strtoul().

Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
Reviewed-by: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/r/1336324264.2897.9.camel@lorien2
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
Shuah Khan authored and H. Peter Anvin committed May 7, 2012
1 parent d48b97b commit e826abd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions arch/x86/kernel/microcode_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,11 @@ static ssize_t reload_store(struct device *dev,
{
unsigned long val;
int cpu = dev->id;
int ret = 0;
char *end;
ssize_t ret = 0;

val = simple_strtoul(buf, &end, 0);
if (end == buf)
return -EINVAL;
ret = kstrtoul(buf, 0, &val);
if (ret)
return ret;

if (val == 1) {
get_online_cpus();
Expand Down

0 comments on commit e826abd

Please sign in to comment.