From: Christophe JAILLET Date: Sat, 14 Jan 2023 17:21:38 +0000 (+0100) Subject: initramfs: use kstrtobool() instead of strtobool() X-Git-Tag: v6.3-rc1~112^2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3296f80c8065b26a27eb8ab686d0c1d67880524;p=thirdparty%2Fkernel%2Flinux.git initramfs: 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 () Link: https://lkml.kernel.org/r/2597e80cb7059ec6ad63a01b77d7c944dcc99195.1673716768.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Cc: Christian Brauner Cc: David Disseldorp Cc: "Eric W. Biederman" Cc: Martin Wilck Cc: wuchi Cc: XU pengfei Signed-off-by: Andrew Morton --- diff --git a/init/initramfs.c b/init/initramfs.c index 62321883fe613..f6c112e30bd47 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -571,8 +572,7 @@ __setup("keepinitrd", keepinitrd_setup); static bool __initdata initramfs_async = true; static int __init initramfs_async_setup(char *str) { - strtobool(str, &initramfs_async); - return 1; + return kstrtobool(str, &initramfs_async) == 0; } __setup("initramfs_async=", initramfs_async_setup);