public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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,
	shuahkhan@gmail.com, muli@cs.technion.ac.il, tglx@linutronix.de
Subject: [tip:x86/cleanups] x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage
Date: Mon, 21 May 2012 02:47:24 -0700	[thread overview]
Message-ID: <tip-74bc491795420254f8b9c782ec654c9ba005d3ac@git.kernel.org> (raw)
In-Reply-To: <1337556268.3126.5.camel@lorien2>

Commit-ID:  74bc491795420254f8b9c782ec654c9ba005d3ac
Gitweb:     http://git.kernel.org/tip/74bc491795420254f8b9c782ec654c9ba005d3ac
Author:     Shuah Khan <shuahkhan@gmail.com>
AuthorDate: Sun, 20 May 2012 17:24:28 -0600
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 21 May 2012 10:29:40 +0200

x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage

Change calgary_parse_options() to call kstrtoul() instead of
calling obsoleted simple_strtoul().

Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
Acked-by: Muli Ben-Yehuda <muli@cs.technion.ac.il>
Cc: jdmason@kudzu.us
Link: http://lkml.kernel.org/r/1337556268.3126.5.camel@lorien2
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/pci-calgary_64.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index 6ac5782..dbbfb26 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -1479,8 +1479,9 @@ cleanup:
 static int __init calgary_parse_options(char *p)
 {
 	unsigned int bridge;
+	unsigned long val;
 	size_t len;
-	char* endp;
+	ssize_t ret;
 
 	while (*p) {
 		if (!strncmp(p, "64k", 3))
@@ -1511,10 +1512,11 @@ static int __init calgary_parse_options(char *p)
 				++p;
 			if (*p == '\0')
 				break;
-			bridge = simple_strtoul(p, &endp, 0);
-			if (p == endp)
+			ret = kstrtoul(p, 0, &val);
+			if (ret)
 				break;
 
+			bridge = val;
 			if (bridge < MAX_PHB_BUS_NUM) {
 				printk(KERN_INFO "Calgary: disabling "
 				       "translation for PHB %#x\n", bridge);

      parent reply	other threads:[~2012-05-21  9:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-20 23:24 [PATCH] x86: kernel/pci-calgary_64.c simple_strtoul cleanup Shuah Khan
2012-05-21  6:00 ` Muli Ben-Yehuda
2012-05-21  9:47 ` 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-74bc491795420254f8b9c782ec654c9ba005d3ac@git.kernel.org \
    --to=shuahkhan@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=muli@cs.technion.ac.il \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox