public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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: Mon, 15 Mar 2021 06:58:05 +0800	[thread overview]
Message-ID: <202103150602.3dWLKZsl-lkp@intel.com> (raw)

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

             reply	other threads:[~2021-03-14 23:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-14 22:58 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

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=202103150602.3dWLKZsl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickhu@andestech.com \
    --cc=nylon7@andestech.com \
    --cc=palmerdabbelt@google.com \
    /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