From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: arch/riscv/mm/kasan_init.c:99:13: warning: no previous prototype for function 'kasan_shallow_populate'
Date: Thu, 04 Mar 2021 15:41:58 +0800 [thread overview]
Message-ID: <202103041552.h12jUtAx-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3119 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f69d02e37a85645aa90d18cacfff36dba370f797
commit: e178d670f251b6947d6be99c0014e9a57ad4f0e0 riscv/kasan: add KASAN_VMALLOC support
date: 13 days ago
config: riscv-randconfig-r022-20210304 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project eec7f8f7b1226be422a76542cb403d02538f453a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e178d670f251b6947d6be99c0014e9a57ad4f0e0
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e178d670f251b6947d6be99c0014e9a57ad4f0e0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> arch/riscv/mm/kasan_init.c:99:13: warning: no previous prototype for function 'kasan_shallow_populate' [-Wmissing-prototypes]
void __init kasan_shallow_populate(void *start, void *end)
^
arch/riscv/mm/kasan_init.c:99:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init kasan_shallow_populate(void *start, void *end)
^
static
1 warning generated.
vim +/kasan_shallow_populate +99 arch/riscv/mm/kasan_init.c
98
> 99 void __init kasan_shallow_populate(void *start, void *end)
100 {
101 unsigned long vaddr = (unsigned long)start & PAGE_MASK;
102 unsigned long vend = PAGE_ALIGN((unsigned long)end);
103 unsigned long pfn;
104 int index;
105 void *p;
106 pud_t *pud_dir, *pud_k;
107 pgd_t *pgd_dir, *pgd_k;
108 p4d_t *p4d_dir, *p4d_k;
109
110 while (vaddr < vend) {
111 index = pgd_index(vaddr);
112 pfn = csr_read(CSR_SATP) & SATP_PPN;
113 pgd_dir = (pgd_t *)pfn_to_virt(pfn) + index;
114 pgd_k = init_mm.pgd + index;
115 pgd_dir = pgd_offset_k(vaddr);
116 set_pgd(pgd_dir, *pgd_k);
117
118 p4d_dir = p4d_offset(pgd_dir, vaddr);
119 p4d_k = p4d_offset(pgd_k, vaddr);
120
121 vaddr = (vaddr + PUD_SIZE) & PUD_MASK;
122 pud_dir = pud_offset(p4d_dir, vaddr);
123 pud_k = pud_offset(p4d_k, vaddr);
124
125 if (pud_present(*pud_dir)) {
126 p = early_alloc(PAGE_SIZE, NUMA_NO_NODE);
127 pud_populate(&init_mm, pud_dir, p);
128 }
129 vaddr += PAGE_SIZE;
130 }
131 }
132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32585 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Nylon Chen <nylon7@andestech.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org,
Palmer Dabbelt <palmerdabbelt@google.com>,
Nick Hu <nickhu@andestech.com>
Subject: arch/riscv/mm/kasan_init.c:99:13: warning: no previous prototype for function 'kasan_shallow_populate'
Date: Thu, 4 Mar 2021 15:41:58 +0800 [thread overview]
Message-ID: <202103041552.h12jUtAx-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3045 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f69d02e37a85645aa90d18cacfff36dba370f797
commit: e178d670f251b6947d6be99c0014e9a57ad4f0e0 riscv/kasan: add KASAN_VMALLOC support
date: 13 days ago
config: riscv-randconfig-r022-20210304 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project eec7f8f7b1226be422a76542cb403d02538f453a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e178d670f251b6947d6be99c0014e9a57ad4f0e0
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e178d670f251b6947d6be99c0014e9a57ad4f0e0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> arch/riscv/mm/kasan_init.c:99:13: warning: no previous prototype for function 'kasan_shallow_populate' [-Wmissing-prototypes]
void __init kasan_shallow_populate(void *start, void *end)
^
arch/riscv/mm/kasan_init.c:99:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init kasan_shallow_populate(void *start, void *end)
^
static
1 warning generated.
vim +/kasan_shallow_populate +99 arch/riscv/mm/kasan_init.c
98
> 99 void __init kasan_shallow_populate(void *start, void *end)
100 {
101 unsigned long vaddr = (unsigned long)start & PAGE_MASK;
102 unsigned long vend = PAGE_ALIGN((unsigned long)end);
103 unsigned long pfn;
104 int index;
105 void *p;
106 pud_t *pud_dir, *pud_k;
107 pgd_t *pgd_dir, *pgd_k;
108 p4d_t *p4d_dir, *p4d_k;
109
110 while (vaddr < vend) {
111 index = pgd_index(vaddr);
112 pfn = csr_read(CSR_SATP) & SATP_PPN;
113 pgd_dir = (pgd_t *)pfn_to_virt(pfn) + index;
114 pgd_k = init_mm.pgd + index;
115 pgd_dir = pgd_offset_k(vaddr);
116 set_pgd(pgd_dir, *pgd_k);
117
118 p4d_dir = p4d_offset(pgd_dir, vaddr);
119 p4d_k = p4d_offset(pgd_k, vaddr);
120
121 vaddr = (vaddr + PUD_SIZE) & PUD_MASK;
122 pud_dir = pud_offset(p4d_dir, vaddr);
123 pud_k = pud_offset(p4d_k, vaddr);
124
125 if (pud_present(*pud_dir)) {
126 p = early_alloc(PAGE_SIZE, NUMA_NO_NODE);
127 pud_populate(&init_mm, pud_dir, p);
128 }
129 vaddr += PAGE_SIZE;
130 }
131 }
132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32585 bytes --]
next reply other threads:[~2021-03-04 7:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 7:41 kernel test robot [this message]
2021-03-04 7:41 ` arch/riscv/mm/kasan_init.c:99:13: warning: no previous prototype for function 'kasan_shallow_populate' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-03-14 22:58 kernel test robot
2021-03-14 22:58 ` kernel test robot
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=202103041552.h12jUtAx-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.