All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: kernel/pci-calgary_64.c simple_strtoul cleanup
@ 2012-05-20 23:24 Shuah Khan
  2012-05-21  6:00 ` Muli Ben-Yehuda
  2012-05-21  9:47 ` [tip:x86/cleanups] x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage tip-bot for Shuah Khan
  0 siblings, 2 replies; 3+ messages in thread
From: Shuah Khan @ 2012-05-20 23:24 UTC (permalink / raw)
  To: muli, jdmason, tglx, mingo, hpa; +Cc: shuahkhan, x86, discuss, LKML

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

Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
---
 arch/x86/kernel/pci-calgary_64.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index d0b2fb9..b72838b 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -1480,8 +1480,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))
@@ -1512,10 +1513,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);
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: kernel/pci-calgary_64.c simple_strtoul cleanup
  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:x86/cleanups] x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage tip-bot for Shuah Khan
  1 sibling, 0 replies; 3+ messages in thread
From: Muli Ben-Yehuda @ 2012-05-21  6:00 UTC (permalink / raw)
  To: Shuah Khan; +Cc: muli, jdmason, tglx, mingo, hpa, x86, discuss, LKML

On Sun, May 20, 2012 at 05:24:28PM -0600, Shuah Khan wrote:
> 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>

Cheers,
Muli

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/cleanups] x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage
  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
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Shuah Khan @ 2012-05-21  9:47 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, shuahkhan, muli, tglx

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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-21  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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:x86/cleanups] x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage tip-bot for Shuah Khan

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.