Commit 5c0198b6 authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Linus Torvalds

kasan: fix coccinelle warnings in kasan_p*_table

kasan_p4d_table(), kasan_pmd_table() and kasan_pud_table() are declared
as returning bool, but return 0 instead of false, which produces a
coccinelle warning.  Fix it.

Link: http://lkml.kernel.org/r/1fa6fadf644859e8a6a8ecce258444b49be8c7ee.1551716733.git.andreyknvl@google.com
Fixes: 0207df4f ("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN")
Signed-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Acked-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bcf6f55a
...@@ -42,7 +42,7 @@ static inline bool kasan_p4d_table(pgd_t pgd) ...@@ -42,7 +42,7 @@ static inline bool kasan_p4d_table(pgd_t pgd)
#else #else
static inline bool kasan_p4d_table(pgd_t pgd) static inline bool kasan_p4d_table(pgd_t pgd)
{ {
return 0; return false;
} }
#endif #endif
#if CONFIG_PGTABLE_LEVELS > 3 #if CONFIG_PGTABLE_LEVELS > 3
...@@ -54,7 +54,7 @@ static inline bool kasan_pud_table(p4d_t p4d) ...@@ -54,7 +54,7 @@ static inline bool kasan_pud_table(p4d_t p4d)
#else #else
static inline bool kasan_pud_table(p4d_t p4d) static inline bool kasan_pud_table(p4d_t p4d)
{ {
return 0; return false;
} }
#endif #endif
#if CONFIG_PGTABLE_LEVELS > 2 #if CONFIG_PGTABLE_LEVELS > 2
...@@ -66,7 +66,7 @@ static inline bool kasan_pmd_table(pud_t pud) ...@@ -66,7 +66,7 @@ static inline bool kasan_pmd_table(pud_t pud)
#else #else
static inline bool kasan_pmd_table(pud_t pud) static inline bool kasan_pmd_table(pud_t pud)
{ {
return 0; return false;
} }
#endif #endif
pte_t kasan_early_shadow_pte[PTRS_PER_PTE] __page_aligned_bss; pte_t kasan_early_shadow_pte[PTRS_PER_PTE] __page_aligned_bss;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment