[openeuler:openEuler-1.0-LTS 1510/1510] kernel/livepatch/core.c:1013:12: warning: no previous prototype for function 'arch_klp_func_can_patch'

Hi Cheng, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: db5f05c237bbdb9b4d5862fc59bdbdafa8f72a73 commit: 7e2ab91ea07673f855f16b54b7c6e6853b2efc1c [1510/1510] livepatch/x86: support livepatch without ftrace config: x86_64-randconfig-161-20250322 (https://download.01.org/0day-ci/archive/20250322/202503220808.5u1Nsd2B-lkp@i...) compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250322/202503220808.5u1Nsd2B-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/202503220808.5u1Nsd2B-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/livepatch/core.c:75:16: warning: no previous prototype for function 'klp_check_patch_kprobed' [-Wmissing-prototypes] 75 | struct kprobe *klp_check_patch_kprobed(struct klp_patch *patch) | ^ kernel/livepatch/core.c:75:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 75 | struct kprobe *klp_check_patch_kprobed(struct klp_patch *patch) | ^ | static kernel/livepatch/core.c:402:5: warning: no previous prototype for function 'klp_try_disable_patch' [-Wmissing-prototypes] 402 | int klp_try_disable_patch(void *data) | ^ kernel/livepatch/core.c:402:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 402 | int klp_try_disable_patch(void *data) | ^ | static kernel/livepatch/core.c:441:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 441 | void __weak arch_klp_code_modify_prepare(void) | ^ kernel/livepatch/core.c:441:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 441 | void __weak arch_klp_code_modify_prepare(void) | ^ | static kernel/livepatch/core.c:445:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 445 | void __weak arch_klp_code_modify_post_process(void) | ^ kernel/livepatch/core.c:445:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 445 | void __weak arch_klp_code_modify_post_process(void) | ^ | static kernel/livepatch/core.c:617:5: warning: no previous prototype for function 'klp_try_enable_patch' [-Wmissing-prototypes] 617 | int klp_try_enable_patch(void *data) | ^ kernel/livepatch/core.c:617:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 617 | int klp_try_enable_patch(void *data) | ^ | static
kernel/livepatch/core.c:1013:12: warning: no previous prototype for function 'arch_klp_func_can_patch' [-Wmissing-prototypes] 1013 | int __weak arch_klp_func_can_patch(struct klp_func *func) | ^ kernel/livepatch/core.c:1013:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1013 | int __weak arch_klp_func_can_patch(struct klp_func *func) | ^ | static 6 warnings generated.
vim +/arch_klp_func_can_patch +1013 kernel/livepatch/core.c b700e7f03df5d92 Seth Jennings 2014-12-16 1011 453d38459f94417 Cheng Jian 2019-01-28 1012 #ifdef CONFIG_LIVEPATCH_WO_FTRACE 453d38459f94417 Cheng Jian 2019-01-28 @1013 int __weak arch_klp_func_can_patch(struct klp_func *func) 453d38459f94417 Cheng Jian 2019-01-28 1014 { 453d38459f94417 Cheng Jian 2019-01-28 1015 return 0; 453d38459f94417 Cheng Jian 2019-01-28 1016 } 453d38459f94417 Cheng Jian 2019-01-28 1017 #endif 453d38459f94417 Cheng Jian 2019-01-28 1018 :::::: The code at line 1013 was first introduced by commit :::::: 453d38459f94417d9d5db7b75ed181a932e34ffc livepatch/arm64: fix func size less than limit :::::: TO: Cheng Jian <cj.chengjian@huawei.com> :::::: CC: Xie XiuQi <xiexiuqi@huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot