x86/xen: 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: 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>
This commit is contained in:
parent
4bff677b30
commit
639b2e2ff1
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue