Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cifs: Use kstrtobool() instead of strtobool()

strtobool() is the same as kstrtobool().
However, the latter is more used within the kernel.

In order to remove strtobool() and slightly simplify kstrtox.h, switch to
the other function name.

While at it, include the corresponding header file (<linux/kstrtox.h>)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Paulo Alcantara <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

Christophe JAILLET and committed by
Steve French
9f5d1a8c c9c3395d

+3 -2
+3 -2
fs/cifs/cifs_debug.c
··· 8 8 #include <linux/fs.h> 9 9 #include <linux/string.h> 10 10 #include <linux/ctype.h> 11 + #include <linux/kstrtox.h> 11 12 #include <linux/module.h> 12 13 #include <linux/proc_fs.h> 13 14 #include <linux/uaccess.h> ··· 788 787 rc = get_user(c[0], buffer); 789 788 if (rc) 790 789 return rc; 791 - if (strtobool(c, &bv) == 0) 790 + if (kstrtobool(c, &bv) == 0) 792 791 cifsFYI = bv; 793 792 else if ((c[0] > '1') && (c[0] <= '9')) 794 793 cifsFYI = (int) (c[0] - '0'); /* see cifs_debug.h for meanings */ ··· 948 947 949 948 if (count < 3) { 950 949 /* single char or single char followed by null */ 951 - if (strtobool(flags_string, &bv) == 0) { 950 + if (kstrtobool(flags_string, &bv) == 0) { 952 951 global_secflags = bv ? CIFSSEC_MAX : CIFSSEC_DEF; 953 952 return count; 954 953 } else if (!isdigit(flags_string[0])) {