mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + mm-use-strtobool-for-param-parsing.patch added to -mm tree
@ 2022-02-27 21:51 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-02-27 21:51 UTC (permalink / raw)
  To: mm-commits, linux, akpm


The patch titled
     Subject: mm/page_table_check.c: use strtobool for param parsing
has been added to the -mm tree.  Its filename is
     mm-use-strtobool-for-param-parsing.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-use-strtobool-for-param-parsing.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-use-strtobool-for-param-parsing.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: "Dr. David Alan Gilbert" <linux@treblig.org>
Subject: 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>
---

 mm/page_table_check.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

--- a/mm/page_table_check.c~mm-use-strtobool-for-param-parsing
+++ a/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);
_

Patches currently in -mm which might be from linux@treblig.org are

mm-use-strtobool-for-param-parsing.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-27 21:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-27 21:51 + mm-use-strtobool-for-param-parsing.patch added to -mm tree Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).