linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata: replace strict_strtol() with kstrtol()
@ 2013-07-19  6:56 Jingoo Han
  2013-07-22 20:15 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-07-19  6:56 UTC (permalink / raw)
  To: Tejun Heo; +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/ata/libata-scsi.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 83c0890..b1e880a 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -206,8 +206,10 @@ static ssize_t ata_scsi_park_store(struct device *device,
 	unsigned long flags;
 	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 > ATA_TMOUT_MAX_PARK) {
 		rc = -EOVERFLOW;
-- 
1.7.10.4



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

* Re: [PATCH] libata: replace strict_strtol() with kstrtol()
  2013-07-19  6:56 [PATCH] libata: replace strict_strtol() with kstrtol() Jingoo Han
@ 2013-07-22 20:15 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2013-07-22 20:15 UTC (permalink / raw)
  To: Jingoo Han; +Cc: linux-ide

On Fri, Jul 19, 2013 at 03:56:41PM +0900, Jingoo Han wrote:
> 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 to libata/for-3.11-fixes.

Thanks!

-- 
tejun

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

end of thread, other threads:[~2013-07-22 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19  6:56 [PATCH] libata: replace strict_strtol() with kstrtol() Jingoo Han
2013-07-22 20:15 ` Tejun Heo

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