Skip to content

Commit 92da988

Browse files
tobluxakpm00
authored andcommitted
kasan: hw_tags: Use str_on_off() helper in kasan_init_hw_tags()
Remove hard-coded strings by using the str_on_off() helper function. Link: https://lkml.kernel.org/r/20250114150935.780869-2-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Suggested-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Dmitriy Vyukov <dvyukov@google.com> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 3bd6137 commit 92da988

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mm/kasan/hw_tags.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/mm.h>
1717
#include <linux/static_key.h>
1818
#include <linux/string.h>
19+
#include <linux/string_choices.h>
1920
#include <linux/types.h>
2021
#include <linux/vmalloc.h>
2122

@@ -263,8 +264,8 @@ void __init kasan_init_hw_tags(void)
263264

264265
pr_info("KernelAddressSanitizer initialized (hw-tags, mode=%s, vmalloc=%s, stacktrace=%s)\n",
265266
kasan_mode_info(),
266-
kasan_vmalloc_enabled() ? "on" : "off",
267-
kasan_stack_collection_enabled() ? "on" : "off");
267+
str_on_off(kasan_vmalloc_enabled()),
268+
str_on_off(kasan_stack_collection_enabled()));
268269
}
269270

270271
#ifdef CONFIG_KASAN_VMALLOC

0 commit comments

Comments
 (0)