From: tip-bot for Shuah Khan <shuahkhan@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
fweisbec@gmail.com, shuahkhan@gmail.com, a.p.zijlstra@chello.nl,
tglx@linutronix.de
Subject: [tip:perf/core] perf/x86: Convert obsolete simple_strtoul() usage to kstrtoul()
Date: Mon, 11 Jun 2012 02:13:01 -0700 [thread overview]
Message-ID: <tip-e2b297fcf17fc03734e93387fb8195c782286b35@git.kernel.org> (raw)
In-Reply-To: <1339384421.3025.8.camel@lorien2>
Commit-ID: e2b297fcf17fc03734e93387fb8195c782286b35
Gitweb: http://git.kernel.org/tip/e2b297fcf17fc03734e93387fb8195c782286b35
Author: Shuah Khan <shuahkhan@gmail.com>
AuthorDate: Sun, 10 Jun 2012 21:13:41 -0600
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 11 Jun 2012 10:52:12 +0200
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>
---
arch/x86/kernel/cpu/perf_event.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 000a474..766c76d 100644
--- 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;
prev parent reply other threads:[~2012-06-11 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-11 3:13 [PATCH] x86: kernel/cpu/perf_event.c simple_strtoul cleanup Shuah Khan
2012-06-11 9:13 ` tip-bot for Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-e2b297fcf17fc03734e93387fb8195c782286b35@git.kernel.org \
--to=shuahkhan@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.