summaryrefslogtreecommitdiff
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-03-03 21:09:52 -0900
committerKent Overstreet <kent.overstreet@gmail.com>2017-03-03 23:17:31 -0900
commit171ee48e57be78f4e95954c99851553fa523bf91 (patch)
tree5a54443f074f8f7922eda1451743bb9d2f60368e /include/linux/kernel.h
parenta5b5eba7f788bb77cf57f9c94f3474a2d439ab0b (diff)
Delete more unused shim code, update bcache code
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index ac72858b..741e0ba4 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -194,6 +194,26 @@ static inline int __must_check kstrtol(const char *s, unsigned int base, long *r
int __must_check kstrtouint(const char *s, unsigned int base, unsigned int *res);
int __must_check kstrtoint(const char *s, unsigned int base, int *res);
+static inline int __must_check kstrtou64(const char *s, unsigned int base, u64 *res)
+{
+ return kstrtoull(s, base, res);
+}
+
+static inline int __must_check kstrtos64(const char *s, unsigned int base, s64 *res)
+{
+ return kstrtoll(s, base, res);
+}
+
+static inline int __must_check kstrtou32(const char *s, unsigned int base, u32 *res)
+{
+ return kstrtouint(s, base, res);
+}
+
+static inline int __must_check kstrtos32(const char *s, unsigned int base, s32 *res)
+{
+ return kstrtoint(s, base, res);
+}
+
/* Permissions on a sysfs file: you didn't miss the 0 prefix did you? */
#define VERIFY_OCTAL_PERMISSIONS(perms) \
(BUILD_BUG_ON_ZERO((perms) < 0) + \