]> git.baikalelectronics.ru Git - kernel.git/commit
mm: hugetlb_vmemmap: use kstrtobool for hugetlb_vmemmap param parsing
authorMuchun Song <songmuchun@bytedance.com>
Fri, 13 May 2022 23:48:56 +0000 (16:48 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 13 May 2022 23:48:56 +0000 (16:48 -0700)
commit0bb41dce128e82f287be64f42abf7a6ded90bf33
treed1a731e63a4fd6c06f86e33bb57608a335e6d106
parenta720e8a71e14b3740714b11d504ad91645431f9c
mm: hugetlb_vmemmap: use kstrtobool for hugetlb_vmemmap param parsing

Use kstrtobool rather than open coding "on" and "off" parsing in
mm/hugetlb_vmemmap.c, which is more powerful to handle all kinds of
parameters like 'Yy1Nn0' or [oO][NnFf] for "on" and "off".

Link: https://lkml.kernel.org/r/20220512041142.39501-4-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Xiongchun Duan <duanxiongchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/admin-guide/kernel-parameters.txt
mm/hugetlb_vmemmap.c