projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a3f226
)
mm/page_table_check.c: use strtobool for param parsing
author
Dr. David Alan Gilbert
<linux@treblig.org>
Tue, 22 Mar 2022 21:48:04 +0000
(14:48 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Tue, 22 Mar 2022 22:57:11 +0000
(15:57 -0700)
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>
mm/page_table_check.c
patch
|
blob
|
history
diff --git
a/mm/page_table_check.c
b/mm/page_table_check.c
index
3763bd0
..
2458281
100644
(file)
--- a/
mm/page_table_check.c
+++ b/
mm/page_table_check.c
@@
-23,15
+23,7
@@
EXPORT_SYMBOL(page_table_check_disabled);
static int __init early_page_table_check_param(char *buf)
{
- if (!buf)
- 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;
+ return strtobool(buf, &__page_table_check_enabled);
}
early_param("page_table_check", early_page_table_check_param);