]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86/xen: Use kstrtobool() instead of strtobool()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 1 Nov 2022 21:14:16 +0000 (22:14 +0100)
committerJuergen Gross <jgross@suse.com>
Mon, 14 Nov 2022 12:29:01 +0000 (13:29 +0100)
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: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/e91af3c8708af38b1c57e0a2d7eb9765dda0e963.1667336095.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/enlighten_pv.c
arch/x86/xen/setup.c

index 0ad3d4bf52b33f2466825d80522db34c8a711a70..34b05ee1523fe5c9aaf9f2825995cb77b3988ca1 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/start_kernel.h>
 #include <linux/sched.h>
 #include <linux/kprobes.h>
+#include <linux/kstrtox.h>
 #include <linux/memblock.h>
 #include <linux/export.h>
 #include <linux/mm.h>
@@ -113,7 +114,7 @@ static __read_mostly bool xen_msr_safe = IS_ENABLED(CONFIG_XEN_PV_MSR_SAFE);
 static int __init parse_xen_msr_safe(char *str)
 {
        if (str)
-               return strtobool(str, &xen_msr_safe);
+               return kstrtobool(str, &xen_msr_safe);
        return -EINVAL;
 }
 early_param("xen_msr_safe", parse_xen_msr_safe);
index 4f4309500559a30c885e4cf18a6454d91886e992..8db26f10fb1d95f6894cdf6ab5190907e7ba2274 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <linux/init.h>
 #include <linux/sched.h>
+#include <linux/kstrtox.h>
 #include <linux/mm.h>
 #include <linux/pm.h>
 #include <linux/memblock.h>
@@ -85,7 +86,7 @@ static void __init xen_parse_512gb(void)
        arg = strstr(xen_start_info->cmd_line, "xen_512gb_limit=");
        if (!arg)
                val = true;
-       else if (strtobool(arg + strlen("xen_512gb_limit="), &val))
+       else if (kstrtobool(arg + strlen("xen_512gb_limit="), &val))
                return;
 
        xen_512gb_limit = val;