From: kbuild test robot <lkp@intel.com>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Dmitry Vyukov <dvyukov@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: mm/kasan/init.c:44:8-9: WARNING: return of 0/1 in function 'kasan_p4d_table' with return type bool
Date: Mon, 4 Mar 2019 06:07:18 +0800 [thread overview]
Message-ID: <201903040615.AFuPIoDo%fengguang.wu@intel.com> (raw)
Hi Andrey,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c027c7cf1577bc2333449447c6e48c93126a56b0
commit: b938fcf42739de8270e6ea41593722929c8a7dd0 kasan: rename source files to reflect the new naming scheme
date: 9 weeks ago
coccinelle warnings: (new ones prefixed by >>)
>> mm/kasan/init.c:44:8-9: WARNING: return of 0/1 in function 'kasan_p4d_table' with return type bool
>> mm/kasan/init.c:68:8-9: WARNING: return of 0/1 in function 'kasan_pmd_table' with return type bool
>> mm/kasan/init.c:56:8-9: WARNING: return of 0/1 in function 'kasan_pud_table' with return type bool
vim +/kasan_p4d_table +44 mm/kasan/init.c
69786cdb3 mm/kasan/kasan_init.c Andrey Ryabinin 2015-08-13 34
c2febafc6 mm/kasan/kasan_init.c Kirill A. Shutemov 2017-03-09 35 #if CONFIG_PGTABLE_LEVELS > 4
c65e774fb mm/kasan/kasan_init.c Kirill A. Shutemov 2018-02-14 36 p4d_t kasan_zero_p4d[MAX_PTRS_PER_P4D] __page_aligned_bss;
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 37 static inline bool kasan_p4d_table(pgd_t pgd)
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 38 {
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 39 return pgd_page(pgd) == virt_to_page(lm_alias(kasan_zero_p4d));
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 40 }
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 41 #else
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 42 static inline bool kasan_p4d_table(pgd_t pgd)
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 43 {
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 @44 return 0;
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 45 }
c2febafc6 mm/kasan/kasan_init.c Kirill A. Shutemov 2017-03-09 46 #endif
69786cdb3 mm/kasan/kasan_init.c Andrey Ryabinin 2015-08-13 47 #if CONFIG_PGTABLE_LEVELS > 3
69786cdb3 mm/kasan/kasan_init.c Andrey Ryabinin 2015-08-13 48 pud_t kasan_zero_pud[PTRS_PER_PUD] __page_aligned_bss;
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 49 static inline bool kasan_pud_table(p4d_t p4d)
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 50 {
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 51 return p4d_page(p4d) == virt_to_page(lm_alias(kasan_zero_pud));
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 52 }
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 53 #else
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 54 static inline bool kasan_pud_table(p4d_t p4d)
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 55 {
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 @56 return 0;
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 57 }
69786cdb3 mm/kasan/kasan_init.c Andrey Ryabinin 2015-08-13 58 #endif
69786cdb3 mm/kasan/kasan_init.c Andrey Ryabinin 2015-08-13 59 #if CONFIG_PGTABLE_LEVELS > 2
69786cdb3 mm/kasan/kasan_init.c Andrey Ryabinin 2015-08-13 60 pmd_t kasan_zero_pmd[PTRS_PER_PMD] __page_aligned_bss;
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 61 static inline bool kasan_pmd_table(pud_t pud)
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 62 {
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 63 return pud_page(pud) == virt_to_page(lm_alias(kasan_zero_pmd));
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 64 }
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 65 #else
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 66 static inline bool kasan_pmd_table(pud_t pud)
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 67 {
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 @68 return 0;
0207df4fa mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 69 }
69786cdb3 mm/kasan/kasan_init.c Andrey Ryabinin 2015-08-13 70 #endif
69786cdb3 mm/kasan/kasan_init.c Andrey Ryabinin 2015-08-13 71 pte_t kasan_zero_pte[PTRS_PER_PTE] __page_aligned_bss;
69786cdb3 mm/kasan/kasan_init.c Andrey Ryabinin 2015-08-13 72
:::::: The code at line 44 was first introduced by commit
:::::: 0207df4fa1a869281ddbf72db6203dbf036b3e1a kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN
:::::: TO: Andrey Ryabinin <aryabinin@virtuozzo.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
reply other threads:[~2019-03-03 22:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201903040615.AFuPIoDo%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=aryabinin@virtuozzo.com \
--cc=dvyukov@google.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).