Skip to contentSkip to conversation

fs: libfs: remove calls to simple_strtoll

PATCH In review Daniel Walker 1 participant 1 message Oct 26, 2013 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 fs: libfs: remove calls to simple_strtoll

---
 fs/libfs.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
fs/libfs.c +7 -4
index 8c50184..0467f6e 100644
@@ -845,10 +845,13 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
 		goto out;
 
 	attr->set_buf[size] = '\0';
-	val = simple_strtoll(attr->set_buf, NULL, 0);
-	ret = attr->set(attr->data, val);
-	if (ret == 0)
-		ret = len; /* on success, claim we got the whole input */
+	ret = kstrtoll(attr->set_buf, 0, &val);
+	if (ret == 0) {
+		ret = attr->set(attr->data, val);
+		if (ret == 0)
+			/* on success, claim we got the whole input */
+			ret = len;
+	}
 out:
 	mutex_unlock(&attr->mutex);
 	return ret;
Signature · 1 line
1.8.3.2