tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb57b1fabcb28f358901b2df90abd2b48abc1ca8
commit: 7fa3e10f0f3646108a1018004d0f571c3222dc9f [2551/10701] x86/mm: Move
pgprot2cachemode out of line
config: x86_64-randconfig-r012-20200519 (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
135b877874fae96b4372c8a3fbfaa8ff44ff86e3)
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 7fa3e10f0f3646108a1018004d0f571c3222dc9f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
arch/x86/mm/init.c:74:6: warning: no previous prototype for function
'x86_has_pat_wp' [-Wmissing-prototypes]
bool x86_has_pat_wp(void)
^
arch/x86/mm/init.c:74:1: note: declare 'static' if the function is not intended to
be used outside of this translation unit
bool x86_has_pat_wp(void)
^
static
> arch/x86/mm/init.c:79:22: warning: no previous prototype for
function 'pgprot2cachemode' [-Wmissing-prototypes]
enum page_cache_mode
pgprot2cachemode(pgprot_t pgprot)
^
arch/x86/mm/init.c:79:1: note: declare 'static' if the function is not intended to
be used outside of this translation unit
enum page_cache_mode pgprot2cachemode(pgprot_t pgprot)
^
static
arch/x86/mm/init.c:875:13: warning: no previous prototype for function
'mem_encrypt_free_decrypted_mem' [-Wmissing-prototypes]
void __weak mem_encrypt_free_decrypted_mem(void) { }
^
arch/x86/mm/init.c:875:1: note: declare 'static' if the function is not intended
to be used outside of this translation unit
void __weak mem_encrypt_free_decrypted_mem(void) { }
^
static
3 warnings generated.
vim +/pgprot2cachemode +79 arch/x86/mm/init.c
72
73 /* Check that the write-protect PAT entry is set for write-protect */
74 bool x86_has_pat_wp(void)
75 {
76 return __pte2cachemode_tbl[_PAGE_CACHE_MODE_WP] == _PAGE_CACHE_MODE_WP;
77 }
78
79 enum page_cache_mode pgprot2cachemode(pgprot_t pgprot)
80 {
81 unsigned long masked;
82
83 masked = pgprot_val(pgprot) & _PAGE_CACHE_MASK;
84 if (likely(masked == 0))
85 return 0;
86 return __pte2cachemode_tbl[__pte2cm_idx(masked)];
87 }
88
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org