projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3e228d
)
perf/x86: Convert obsolete simple_strtoul() usage to kstrtoul()
author
Shuah Khan
<shuahkhan@gmail.com>
Mon, 11 Jun 2012 03:13:41 +0000
(21:13 -0600)
committer
Ingo Molnar
<mingo@kernel.org>
Mon, 11 Jun 2012 08:52:12 +0000
(10:52 +0200)
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>
arch/x86/kernel/cpu/perf_event.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kernel/cpu/perf_event.c
b/arch/x86/kernel/cpu/perf_event.c
index 000a4746c7ced5146c64681be7abacef441bc661..766c76d5ec4c242d310a98a9dfc0caf4af7cefab 100644
(file)
--- a/
arch/x86/kernel/cpu/perf_event.c
+++ b/
arch/x86/kernel/cpu/perf_event.c
@@
-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;