diff options
| author | Minfei Huang <mnghuan@gmail.com> | 2016-05-20 19:58:13 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-20 20:58:30 -0400 |
| commit | 2a138dc7e50bfdc90f9db9b52584ac5564952425 (patch) | |
| tree | 48d3d1a4e3092a1a09cae17da06f849e9f3b455a /mm/page_poison.c | |
| parent | 78ebc2f7146156f488083c9e5a7ded9d5c38c58b (diff) | |
mm: use existing helper to convert "on"/"off" to boolean
It's more convenient to use existing function helper to convert string
"on/off" to boolean.
Link: http://lkml.kernel.org/r/1461908824-16129-1-git-send-email-mnghuan@gmail.com
Signed-off-by: Minfei Huang <mnghuan@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_poison.c')
| -rw-r--r-- | mm/page_poison.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/mm/page_poison.c b/mm/page_poison.c index 479e7ea2bea6..1eae5fad2446 100644 --- a/mm/page_poison.c +++ b/mm/page_poison.c | |||
| @@ -13,13 +13,7 @@ static int early_page_poison_param(char *buf) | |||
| 13 | { | 13 | { |
| 14 | if (!buf) | 14 | if (!buf) |
| 15 | return -EINVAL; | 15 | return -EINVAL; |
| 16 | 16 | return strtobool(buf, &want_page_poisoning); | |
| 17 | if (strcmp(buf, "on") == 0) | ||
| 18 | want_page_poisoning = true; | ||
| 19 | else if (strcmp(buf, "off") == 0) | ||
| 20 | want_page_poisoning = false; | ||
| 21 | |||
| 22 | return 0; | ||
| 23 | } | 17 | } |
| 24 | early_param("page_poison", early_page_poison_param); | 18 | early_param("page_poison", early_page_poison_param); |
| 25 | 19 | ||
