scsi: replace strict_strtoul() with kstrtoul()
Subsystems (2)
PATCH 1/1 scsi: replace strict_strtoul() with kstrtoul()
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used.
Signed-off-by Jingoo Han <[email protected]>
--- drivers/scsi/pmcraid.c | 2 +- drivers/scsi/scsi_sysfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/pmcraid.c +1 -1
@@ -4204,7 +4204,7 @@ static ssize_t pmcraid_store_log_level(struct pmcraid_instance *pinstance;unsigned long val; -if (strict_strtoul (buf,10 , &val)) +if (kstrtoul (buf,10 , &val))return -EINVAL ;/* log-level should be from 0 to 2 */ if (val >2 )
drivers/scsi/scsi_sysfs.c +1 -1
@@ -790,7 +790,7 @@ sdev_store_queue_ramp_up_period(struct device *dev,struct scsi_device *sdev =to_scsi_device (dev);unsigned long period; -if (strict_strtoul (buf,10 , &period)) +if (kstrtoul (buf,10 , &period))return -EINVAL ; sdev->queue_ramp_up_period =msecs_to_jiffies (period);
Signature · 1 line
1.7.10.4
Quoted 7 lines · Jingoo Han
The usage of
strict_strtoul()is not preferred, becausestrict_strtoul()is obsolete. Thus,kstrtoul()should be used.
drivers/scsi/pmcraid.c static ssize_t pmcraid_store_log_level( · line 4210
Quoted 8 lines
drivers/scsi/pmcraid.c +1
-1@@ -4204,7 +4204,7 @@ static ssize_t pmcraid_store_log_level(struct pmcraid_instance *pinstance;unsigned long val; -if (strict_strtoul (buf,10 , &val)) +if (kstrtoul (buf,10 , &val))return -EINVAL ;/* log-level should be from 0 to 2 */ if (val >2 )
int ret;
ret = kstrtoul(...);
if (ret)
return ret;
drivers/scsi/scsi_sysfs.c sdev_store_queue_ramp_up_period(struct device *dev, · line 794
Quoted 11 lines
drivers/scsi/scsi_sysfs.c +1
-1@@ -790,7 +790,7 @@ sdev_store_queue_ramp_up_period(struct device *dev,struct scsi_device *sdev =to_scsi_device (dev);unsigned long period; -if (strict_strtoul (buf,10 , &period)) +if (kstrtoul (buf,10 , &period))return -EINVAL ;
Ditto.
--
With Best Regards,
Andy Shevchenko