s390: 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 <jg1.han@samsung.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
fd3930f70c
commit
0178722be9
|
@ -930,7 +930,7 @@ dasd_use_raw_store(struct device *dev, struct device_attribute *attr,
|
||||||
if (IS_ERR(devmap))
|
if (IS_ERR(devmap))
|
||||||
return PTR_ERR(devmap);
|
return PTR_ERR(devmap);
|
||||||
|
|
||||||
if ((strict_strtoul(buf, 10, &val) != 0) || val > 1)
|
if ((kstrtoul(buf, 10, &val) != 0) || val > 1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
spin_lock(&dasd_devmap_lock);
|
spin_lock(&dasd_devmap_lock);
|
||||||
|
@ -1225,7 +1225,7 @@ dasd_expires_store(struct device *dev, struct device_attribute *attr,
|
||||||
if (IS_ERR(device))
|
if (IS_ERR(device))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if ((strict_strtoul(buf, 10, &val) != 0) ||
|
if ((kstrtoul(buf, 10, &val) != 0) ||
|
||||||
(val > DASD_EXPIRES_MAX) || val == 0) {
|
(val > DASD_EXPIRES_MAX) || val == 0) {
|
||||||
dasd_put_device(device);
|
dasd_put_device(device);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1265,7 +1265,7 @@ dasd_retries_store(struct device *dev, struct device_attribute *attr,
|
||||||
if (IS_ERR(device))
|
if (IS_ERR(device))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if ((strict_strtoul(buf, 10, &val) != 0) ||
|
if ((kstrtoul(buf, 10, &val) != 0) ||
|
||||||
(val > DASD_RETRIES_MAX)) {
|
(val > DASD_RETRIES_MAX)) {
|
||||||
dasd_put_device(device);
|
dasd_put_device(device);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1307,7 +1307,7 @@ dasd_timeout_store(struct device *dev, struct device_attribute *attr,
|
||||||
if (IS_ERR(device) || !device->block)
|
if (IS_ERR(device) || !device->block)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if ((strict_strtoul(buf, 10, &val) != 0) ||
|
if ((kstrtoul(buf, 10, &val) != 0) ||
|
||||||
val > UINT_MAX / HZ) {
|
val > UINT_MAX / HZ) {
|
||||||
dasd_put_device(device);
|
dasd_put_device(device);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -137,7 +137,7 @@ static ssize_t ccwgroup_online_store(struct device *dev,
|
||||||
if (!try_module_get(gdrv->driver.owner))
|
if (!try_module_get(gdrv->driver.owner))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ret = strict_strtoul(buf, 0, &value);
|
ret = kstrtoul(buf, 0, &value);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
|
@ -1182,7 +1182,7 @@ static ssize_t cmb_enable_store(struct device *dev,
|
||||||
int ret;
|
int ret;
|
||||||
unsigned long val;
|
unsigned long val;
|
||||||
|
|
||||||
ret = strict_strtoul(buf, 16, &val);
|
ret = kstrtoul(buf, 16, &val);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
|
@ -740,7 +740,7 @@ css_cm_enable_store(struct device *dev, struct device_attribute *attr,
|
||||||
int ret;
|
int ret;
|
||||||
unsigned long val;
|
unsigned long val;
|
||||||
|
|
||||||
ret = strict_strtoul(buf, 16, &val);
|
ret = kstrtoul(buf, 16, &val);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
mutex_lock(&css->mutex);
|
mutex_lock(&css->mutex);
|
||||||
|
|
|
@ -564,7 +564,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
force = 0;
|
force = 0;
|
||||||
ret = strict_strtoul(buf, 16, &i);
|
ret = kstrtoul(buf, 16, &i);
|
||||||
}
|
}
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -208,7 +208,7 @@ static ssize_t qeth_l3_dev_sniffer_store(struct device *dev,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = strict_strtoul(buf, 16, &i);
|
rc = kstrtoul(buf, 16, &i);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in New Issue