Skip to content

Commit

Permalink
perf/x86: Convert obsolete simple_strtoul() usage to kstrtoul()
Browse files Browse the repository at this point in the history
Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1339384421.3025.8.camel@lorien2
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Shuah Khan authored and Ingo Molnar committed Jun 11, 2012
1 parent c3e228d commit e2b297f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,12 @@ static ssize_t set_attr_rdpmc(struct device *cdev,
struct device_attribute *attr,
const char *buf, size_t count)
{
unsigned long val = simple_strtoul(buf, NULL, 0);
unsigned long val;
ssize_t ret;

ret = kstrtoul(buf, 0, &val);
if (ret)
return ret;

if (!!val != !!x86_pmu.attr_rdpmc) {
x86_pmu.attr_rdpmc = !!val;
Expand Down

0 comments on commit e2b297f

Please sign in to comment.