Skip to contentSkip to conversation

block: replace strict_strtoul() with kstrtoul()

PATCH New Jingoo Han 1 participant 1 message Jul 19, 2013

Subsystems (3)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 block: replace strict_strtoul() with kstrtoul()

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

---
 drivers/block/osdblk.c             |    2 +-
 drivers/block/rbd.c                |    2 +-
 drivers/block/xen-blkback/xenbus.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/block/osdblk.c +1 -1
index 1bbc681..79aa179 100644
@@ -598,7 +598,7 @@ static ssize_t class_osdblk_remove(struct class *c,
 	unsigned long ul;
 	struct list_head *tmp;
 
-	rc = strict_strtoul(buf, 10, &ul);
+	rc = kstrtoul(buf, 10, &ul);
 	if (rc)
 		return rc;
 
drivers/block/rbd.c +1 -1
index 4ad2ad9..9e00010 100644
@@ -5126,7 +5126,7 @@ static ssize_t rbd_remove(struct bus_type *bus,
 	bool already = false;
 	int ret;
 
-	ret = strict_strtoul(buf, 10, &ul);
+	ret = kstrtoul(buf, 10, &ul);
 	if (ret)
 		return ret;
 
drivers/block/xen-blkback/xenbus.c +1 -1
index fe5c3cd..c2014a0 100644
@@ -620,7 +620,7 @@ static void backend_changed(struct xenbus_watch *watch,
 	}
 
 	/* Front end dir is a number, which is used as the handle. */
-	err = strict_strtoul(strrchr(dev->otherend, '/') + 1, 0, &handle);
+	err = kstrtoul(strrchr(dev->otherend, '/') + 1, 0, &handle);
 	if (err)
 		return;
 
Signature · 1 line
1.7.10.4