Skip to content

Commit 0e81f6e

Browse files
tobluxakpm00
authored andcommitted
kasan: sw_tags: use str_on_off() helper in kasan_init_sw_tags()
Remove hard-coded strings by using the str_on_off() helper function. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Thorsten Blum <[email protected]> Suggested-by: Anshuman Khandual <[email protected]> Reviewed-by: Alexander Potapenko <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Dmitriy Vyukov <[email protected]> Cc: Vincenzo Frascino <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent cf929a2 commit 0e81f6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mm/kasan/sw_tags.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/slab.h>
2727
#include <linux/stacktrace.h>
2828
#include <linux/string.h>
29+
#include <linux/string_choices.h>
2930
#include <linux/types.h>
3031
#include <linux/vmalloc.h>
3132
#include <linux/bug.h>
@@ -45,7 +46,7 @@ void __init kasan_init_sw_tags(void)
4546
kasan_init_tags();
4647

4748
pr_info("KernelAddressSanitizer initialized (sw-tags, stacktrace=%s)\n",
48-
kasan_stack_collection_enabled() ? "on" : "off");
49+
str_on_off(kasan_stack_collection_enabled()));
4950
}
5051

5152
/*

0 commit comments

Comments
 (0)