[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1339384421.3025.8.camel@lorien2>
Date: Sun, 10 Jun 2012 21:13:41 -0600
From: Shuah Khan <shuahkhan@...il.com>
To: tglx@...utronix.de, hpa@...or.com
Cc: shuahkhan@...il.com, x86@...nel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86: kernel/cpu/perf_event.c simple_strtoul cleanup
Change set_attr_rdpmc() to call kstrtoul() instead of calling obsoleted
simple_strtoul().
Signed-off-by: Shuah Khan <shuahkhan@...il.com>
---
arch/x86/kernel/cpu/perf_event.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index e049d6d..2e51c82f 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1648,7 +1648,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;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists