kasan: cosmetic changes in report.c
authorAndrey Konovalov <andreyknvl@google.com>
Mon, 5 Sep 2022 21:05:36 +0000 (23:05 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:03:00 +0000 (14:03 -0700)
Do a few non-functional style fixes for the code in report.c.

Link: https://lkml.kernel.org/r/b728eae71f3ea505a885449724de21cf3f476a7b.1662411799.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Peter Collingbourne <pcc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kasan/report.c

index 5d225d7d9c4c783cf579cf263d4932f97ed94185..83f420a28c0b2ea1525bc0839be214c5c28776f3 100644 (file)
@@ -200,25 +200,22 @@ static void print_error_description(struct kasan_report_info *info)
 static void print_track(struct kasan_track *track, const char *prefix)
 {
        pr_err("%s by task %u:\n", prefix, track->pid);
-       if (track->stack) {
+       if (track->stack)
                stack_depot_print(track->stack);
-       } else {
+       else
                pr_err("(stack is not available)\n");
-       }
 }
 
 struct page *kasan_addr_to_page(const void *addr)
 {
-       if ((addr >= (void *)PAGE_OFFSET) &&
-                       (addr < high_memory))
+       if ((addr >= (void *)PAGE_OFFSET) && (addr < high_memory))
                return virt_to_head_page(addr);
        return NULL;
 }
 
 struct slab *kasan_addr_to_slab(const void *addr)
 {
-       if ((addr >= (void *)PAGE_OFFSET) &&
-                       (addr < high_memory))
+       if ((addr >= (void *)PAGE_OFFSET) && (addr < high_memory))
                return virt_to_slab(addr);
        return NULL;
 }