kasan: sw_tags: Use str_on_off() helper in kasan_init_sw_tags()
Subsystems (2)
PATCH 1/1 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.
Suggested-by Anshuman Khandual <[email protected]>
Signed-off-by Thorsten Blum <[email protected]>
--- mm/kasan/sw_tags.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
mm/kasan/sw_tags.c +2 -1
@@ -26,6 +26,7 @@#include <linux/slab.h> #include <linux/stacktrace.h> #include <linux/string.h> +#include <linux/string_choices.h> #include <linux/types.h> #include <linux/vmalloc.h> #include <linux/bug.h>
@@ -45,7 +46,7 @@ void __init kasan_init_sw_tags(void)kasan_init_tags ();pr_info ("KernelAddressSanitizer initialized (sw-tags, stacktrace=%s)\n" , -kasan_stack_collection_enabled () ?"on" :"off" ); +str_on_off (kasan_stack_collection_enabled ())); }/*
Signature · 1 line
2.47.1
Quoted 5 lines · Thorsten Blum
Remove hard-coded strings by using the
str_on_off()helper function.Suggested-by Anshuman Khandual <[email protected]>Signed-off-by Thorsten Blum <[email protected]>
Reviewed-by Alexander Potapenko <[email protected]>
Quoted 31 lines · Thorsten Blum
Remove hard-coded strings by using the
str_on_off()helper function.Suggested-by Anshuman Khandual <[email protected]>Signed-off-by Thorsten Blum <[email protected]>--- mm/kasan/sw_tags.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)mm/kasan/sw_tags.c +2
-2@@ -26,6 +26,7 @@#include <linux/slab.h> #include <linux/stacktrace.h> #include <linux/string.h> +#include <linux/string_choices.h> #include <linux/types.h> #include <linux/vmalloc.h> #include <linux/bug.h> @@ -45,7 +46,7 @@ void __init kasan_init_sw_tags(void)kasan_init_tags ();pr_info ("KernelAddressSanitizer initialized (sw-tags, stacktrace=%s)\n" , -kasan_stack_collection_enabled () ?"on" :"off" ); +str_on_off (kasan_stack_collection_enabled ())); }/* --
Quoted 1 line
2.47.1
Reviewed-by Andrey Konovalov <[email protected]>
Thanks!