[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202103150602.3dWLKZsl-lkp@intel.com>
Date: Mon, 15 Mar 2021 06:58:05 +0800
From: kernel test robot <lkp@...el.com>
To: Nylon Chen <nylon7@...estech.com>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org,
Palmer Dabbelt <palmerdabbelt@...gle.com>,
Nick Hu <nickhu@...estech.com>
Subject: arch/riscv/mm/kasan_init.c:99:13: warning: no previous prototype for
function 'kasan_shallow_populate'
Hi Nylon,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1e28eed17697bcf343c6743f0028cc3b5dd88bf0
commit: e178d670f251b6947d6be99c0014e9a57ad4f0e0 riscv/kasan: add KASAN_VMALLOC support
date: 3 weeks ago
config: riscv-randconfig-r022-20210315 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7ee96429a0b057bcc97331a6a762fc3cd00aed61)
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@...el.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
Download attachment ".config.gz" of type "application/gzip" (35180 bytes)
Powered by blists - more mailing lists