Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752774Ab2FKJNQ (ORCPT ); Mon, 11 Jun 2012 05:13:16 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56757 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490Ab2FKJNO (ORCPT ); Mon, 11 Jun 2012 05:13:14 -0400 Date: Mon, 11 Jun 2012 02:13:01 -0700 From: tip-bot for Shuah Khan Message-ID: 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 Reply-To: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, shuahkhan@gmail.com, fweisbec@gmail.com, a.p.zijlstra@chello.nl, tglx@linutronix.de In-Reply-To: <1339384421.3025.8.camel@lorien2> References: <1339384421.3025.8.camel@lorien2> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf/x86: Convert obsolete simple_strtoul() usage to kstrtoul() Git-Commit-ID: e2b297fcf17fc03734e93387fb8195c782286b35 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Mon, 11 Jun 2012 02:13:07 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1537 Lines: 41 Commit-ID: e2b297fcf17fc03734e93387fb8195c782286b35 Gitweb: http://git.kernel.org/tip/e2b297fcf17fc03734e93387fb8195c782286b35 Author: Shuah Khan AuthorDate: Sun, 10 Jun 2012 21:13:41 -0600 Committer: Ingo Molnar CommitDate: Mon, 11 Jun 2012 10:52:12 +0200 perf/x86: Convert obsolete simple_strtoul() usage to kstrtoul() Signed-off-by: Shuah Khan Cc: Peter Zijlstra Cc: Frederic Weisbecker Link: http://lkml.kernel.org/r/1339384421.3025.8.camel@lorien2 Signed-off-by: Ingo Molnar --- 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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/