[openeuler:OLK-5.10 2882/2882] arch/x86/lib/copy_highpages.c:20:5: warning: no previous prototype for function 'sysctl_hugepage_nocache_copy'

tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: c90dc8f5217147c6c3cfb99d952cfdcaf7e194e1 commit: 50d5bf1b6da9f74bf93f9dec601c09d45d6d8406 [2882/2882] x86: hugepage: use nt copy hugepage to AEP in x86 config: x86_64-randconfig-2002-20250501 (https://download.01.org/0day-ci/archive/20250701/202507011441.j7rBaRlC-lkp@i...) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250701/202507011441.j7rBaRlC-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202507011441.j7rBaRlC-lkp@intel.com/ All warnings (new ones prefixed by >>):
arch/x86/lib/copy_highpages.c:20:5: warning: no previous prototype for function 'sysctl_hugepage_nocache_copy' [-Wmissing-prototypes] 20 | int sysctl_hugepage_nocache_copy(struct ctl_table *table, int write, | ^ arch/x86/lib/copy_highpages.c:20:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 20 | int sysctl_hugepage_nocache_copy(struct ctl_table *table, int write, | ^ | static 1 warning generated.
vim +/sysctl_hugepage_nocache_copy +20 arch/x86/lib/copy_highpages.c 19
20 int sysctl_hugepage_nocache_copy(struct ctl_table *table, int write, 21 void __user *buffer, size_t *lenp, loff_t *ppos) 22 { 23 struct ctl_table t; 24 int err; 25 int state; 26 27 if (write && !capable(CAP_SYS_ADMIN)) 28 return -EPERM; 29 30 state = static_branch_unlikely(&hugepage_nocache_copy); 31 t = *table; 32 t.data = &state; 33 err = proc_dointvec_minmax(&t, write, buffer, lenp, ppos); 34 if (err < 0) 35 return err; 36 if (write) 37 set_hugepage_nocache_copy(state); 38 return err; 39 } 40
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot