[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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxxxx>
:::::: CC: Palmer Dabbelt <palmerdabbelt@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux