linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arch/riscv/mm/kasan_init.c:99:13: warning: no previous prototype for function 'kasan_shallow_populate'
@ 2021-03-04  7:41 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-04  7:41 UTC (permalink / raw)
  To: Nylon Chen
  Cc: kbuild-all, clang-built-linux, linux-kernel, Palmer Dabbelt, Nick Hu

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* arch/riscv/mm/kasan_init.c:99:13: warning: no previous prototype for function 'kasan_shallow_populate'
@ 2021-03-14 22:58 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-14 22:58 UTC (permalink / raw)
  To: Nylon Chen
  Cc: kbuild-all, clang-built-linux, linux-kernel, Palmer Dabbelt, Nick Hu

[-- Attachment #1: Type: text/plain, Size: 3095 bytes --]

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@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: 35180 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-14 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-03-14 22:58 kernel test robot

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).