Skip to content

Commit def7b92

Browse files
tititiou36mcgrof
authored andcommitted
kernel/params.c: 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: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
1 parent c093a74 commit def7b92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/params.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
*/
66
#include <linux/kernel.h>
7+
#include <linux/kstrtox.h>
78
#include <linux/string.h>
89
#include <linux/errno.h>
910
#include <linux/module.h>
@@ -310,7 +311,7 @@ int param_set_bool(const char *val, const struct kernel_param *kp)
310311
if (!val) val = "1";
311312

312313
/* One of =[yYnN01] */
313-
return strtobool(val, kp->arg);
314+
return kstrtobool(val, kp->arg);
314315
}
315316
EXPORT_SYMBOL(param_set_bool);
316317

0 commit comments

Comments
 (0)