tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 25bf6ba385a44e446068067e861e1b843f6174e2 commit: 7e2ab91ea07673f855f16b54b7c6e6853b2efc1c [13138/21930] livepatch/x86: support livepatch without ftrace config: x86_64-randconfig-015-20240323 (https://download.01.org/0day-ci/archive/20240323/202403232323.GK5ks0fh-lkp@i...) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240323/202403232323.GK5ks0fh-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/202403232323.GK5ks0fh-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/kernel/livepatch.c:225:5: warning: no previous prototype for function 'arch_klp_init_func' [-Wmissing-prototypes]
225 | int arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ arch/x86/kernel/livepatch.c:225:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 225 | int arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ | static
arch/x86/kernel/livepatch.c:230:6: warning: no previous prototype for function 'arch_klp_free_func' [-Wmissing-prototypes]
230 | void arch_klp_free_func(struct klp_object *obj, struct klp_func *limit) | ^ arch/x86/kernel/livepatch.c:230:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 230 | void arch_klp_free_func(struct klp_object *obj, struct klp_func *limit) | ^ | static arch/x86/kernel/livepatch.c:258:6: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 258 | void arch_klp_code_modify_prepare(void) | ^ arch/x86/kernel/livepatch.c:258:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 258 | void arch_klp_code_modify_prepare(void) | ^ | static arch/x86/kernel/livepatch.c:264:6: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 264 | void arch_klp_code_modify_post_process(void) | ^ arch/x86/kernel/livepatch.c:264:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 264 | void arch_klp_code_modify_post_process(void) | ^ | static 4 warnings generated. -- 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 5 warnings generated.
vim +/arch_klp_init_func +225 arch/x86/kernel/livepatch.c
224
225 int arch_klp_init_func(struct klp_object *obj, struct klp_func *func)
226 { 227 return 0; 228 } 229
230 void arch_klp_free_func(struct klp_object *obj, struct klp_func *limit)
231 { 232