mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
mm/page_table_check.c: use strtobool for param parsing
Use strtobool rather than open coding "on" and "off" parsing. Link: https://lkml.kernel.org/r/20220227181038.126926-1-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7a3f2263d7
commit
597da28e1a
@ -23,15 +23,7 @@ EXPORT_SYMBOL(page_table_check_disabled);
|
|||||||
|
|
||||||
static int __init early_page_table_check_param(char *buf)
|
static int __init early_page_table_check_param(char *buf)
|
||||||
{
|
{
|
||||||
if (!buf)
|
return strtobool(buf, &__page_table_check_enabled);
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (strcmp(buf, "on") == 0)
|
|
||||||
__page_table_check_enabled = true;
|
|
||||||
else if (strcmp(buf, "off") == 0)
|
|
||||||
__page_table_check_enabled = false;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
early_param("page_table_check", early_page_table_check_param);
|
early_param("page_table_check", early_page_table_check_param);
|
||||||
|
Loading…
Reference in New Issue
Block a user