linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Palmer Dabbelt <palmerdabbelt@google.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 8712/10489] arch/riscv/mm/init.c:707:13: warning: no previous prototype for function 'protect_kernel_linear_mapping_text_rodata'
Date: Wed, 16 Jun 2021 22:15:54 +0800	[thread overview]
Message-ID: <202106162241.yDeqm7Y1-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c7d4c1fd91ab4a6d2620497921a9c6bf54650ab8
commit: 6b456a82fa767f62c1329378c6795410fa9b46e6 [8712/10489] Merge branch 'riscv-wx-mappings' into for-next
config: riscv-randconfig-r026-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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/next/linux-next.git/commit/?id=6b456a82fa767f62c1329378c6795410fa9b46e6
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 6b456a82fa767f62c1329378c6795410fa9b46e6
        # 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/init.c:707:13: warning: no previous prototype for function 'protect_kernel_linear_mapping_text_rodata' [-Wmissing-prototypes]
   void __init protect_kernel_linear_mapping_text_rodata(void)
               ^
   arch/riscv/mm/init.c:707:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __init protect_kernel_linear_mapping_text_rodata(void)
   ^
   static 
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for LOCKDEP
   Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
   Selected by
   - LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
   - DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT


vim +/protect_kernel_linear_mapping_text_rodata +707 arch/riscv/mm/init.c

671f9a3e2e24cd Anup Patel         2019-06-28  705  
8d91b097335892 Geert Uytterhoeven 2021-04-29  706  #if defined(CONFIG_64BIT) && defined(CONFIG_STRICT_KERNEL_RWX)
010623568222bd Jisheng Zhang      2021-05-16 @707  void __init protect_kernel_linear_mapping_text_rodata(void)
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  708  {
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  709  	unsigned long text_start = (unsigned long)lm_alias(_start);
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  710  	unsigned long init_text_start = (unsigned long)lm_alias(__init_text_begin);
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  711  	unsigned long rodata_start = (unsigned long)lm_alias(__start_rodata);
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  712  	unsigned long data_start = (unsigned long)lm_alias(_data);
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  713  
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  714  	set_memory_ro(text_start, (init_text_start - text_start) >> PAGE_SHIFT);
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  715  	set_memory_nx(text_start, (init_text_start - text_start) >> PAGE_SHIFT);
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  716  
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  717  	set_memory_ro(rodata_start, (data_start - rodata_start) >> PAGE_SHIFT);
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  718  	set_memory_nx(rodata_start, (data_start - rodata_start) >> PAGE_SHIFT);
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  719  }
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  720  #endif
2bfc6cd81bd17e Alexandre Ghiti    2021-04-11  721  

:::::: The code at line 707 was first introduced by commit
:::::: 010623568222bd144eb73aa9f3b46c79b63d7676 riscv: mm: init: Consolidate vars, functions

:::::: TO: Jisheng Zhang <jszhang@kernel.org>
:::::: CC: Palmer Dabbelt <palmerdabbelt@google.com>

---
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: 34617 bytes --]

                 reply	other threads:[~2021-06-16 14:16 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=202106162241.yDeqm7Y1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --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;
as well as URLs for NNTP newsgroup(s).