perf/x86: Convert obsolete simple_strtoul() usage to kstrtoul()
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>
This commit is contained in:
parent
c3e228d59b
commit
e2b297fcf1
1 changed files with 6 additions and 1 deletions
|
@ -1640,7 +1640,12 @@ static ssize_t set_attr_rdpmc(struct device *cdev,
|
||||||
struct device_attribute *attr,
|
struct device_attribute *attr,
|
||||||
const char *buf, size_t count)
|
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) {
|
if (!!val != !!x86_pmu.attr_rdpmc) {
|
||||||
x86_pmu.attr_rdpmc = !!val;
|
x86_pmu.attr_rdpmc = !!val;
|
||||||
|
|
Loading…
Add table
Reference in a new issue