linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ide: replace strict_strtol() with kstrtol()
@ 2013-07-19  7:01 Jingoo Han
  2013-09-05 19:38 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-07-19  7:01 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-ide, Jingoo Han

The usage of strict_strtol() is not preferred, because
strict_strtol() is obsolete. Thus, kstrtol() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/ide/ide-park.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c
index 6ab9ab2..f41558a 100644
--- a/drivers/ide/ide-park.c
+++ b/drivers/ide/ide-park.c
@@ -116,8 +116,10 @@ ssize_t ide_park_store(struct device *dev, struct device_attribute *attr,
 	long int input;
 	int rc;
 
-	rc = strict_strtol(buf, 10, &input);
-	if (rc || input < -2)
+	rc = kstrtol(buf, 10, &input);
+	if (rc)
+		return rc;
+	if (input < -2)
 		return -EINVAL;
 	if (input > MAX_PARK_TIMEOUT) {
 		input = MAX_PARK_TIMEOUT;
-- 
1.7.10.4



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

* Re: [PATCH] ide: replace strict_strtol() with kstrtol()
  2013-07-19  7:01 [PATCH] ide: replace strict_strtol() with kstrtol() Jingoo Han
@ 2013-09-05 19:38 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-09-05 19:38 UTC (permalink / raw)
  To: jg1.han; +Cc: linux-ide

From: Jingoo Han <jg1.han@samsung.com>
Date: Fri, 19 Jul 2013 16:01:26 +0900

> The usage of strict_strtol() is not preferred, because
> strict_strtol() is obsolete. Thus, kstrtol() should be
> used.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.

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

end of thread, other threads:[~2013-09-05 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19  7:01 [PATCH] ide: replace strict_strtol() with kstrtol() Jingoo Han
2013-09-05 19:38 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).