Skip to contentSkip to conversation

libata: replace strict_strtol() with kstrtol()

PATCH Applied Jingoo Han 2 participants 2 messages Jul 19, 2013 – Jul 22, 2013 libata

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 libata: replace strict_strtol() with kstrtol()

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

---
 drivers/ata/libata-scsi.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/ata/libata-scsi.c +4 -2
index 83c0890..b1e880a 100644
@@ -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;
Signature · 1 line
1.7.10.4
Applied
#1 lore raw
Quoted 5 lines · Jingoo Han

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

Applied to libata/for-3.11-fixes.

Thanks!

Signature · 1 line
tejun