Hi Zheng,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: df4c334beecb4cf58e4e8d63b491aa5ac0a84f46 commit: 470628a716984e1325b92bef4fa2140ff5a062a5 [1474/1474] livepatch: Use breakpoint exception to optimize enabling livepatch config: arm64-randconfig-003-20241117 (https://download.01.org/0day-ci/archive/20241201/202412011107.mRfBU6d7-lkp@i...) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241201/202412011107.mRfBU6d7-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/202412011107.mRfBU6d7-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/livepatch/core.c:1728:12: warning: no previous prototype for function 'arch_klp_check_activeness_func' [-Wmissing-prototypes] int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, ^ kernel/livepatch/core.c:1728:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, ^ static kernel/livepatch/core.c:1983:14: warning: no previous prototype for function 'arch_klp_mem_alloc' [-Wmissing-prototypes] void __weak *arch_klp_mem_alloc(size_t size) ^ kernel/livepatch/core.c:1983:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak *arch_klp_mem_alloc(size_t size) ^ static kernel/livepatch/core.c:1988:13: warning: no previous prototype for function 'arch_klp_mem_free' [-Wmissing-prototypes] void __weak arch_klp_mem_free(void *mem) ^ kernel/livepatch/core.c:1988:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_klp_mem_free(void *mem) ^ static kernel/livepatch/core.c:1993:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] void __weak arch_klp_code_modify_prepare(void) ^ kernel/livepatch/core.c:1993:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_klp_code_modify_prepare(void) ^ static kernel/livepatch/core.c:1997:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] void __weak arch_klp_code_modify_post_process(void) ^ kernel/livepatch/core.c:1997:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_klp_code_modify_post_process(void) ^ static
kernel/livepatch/core.c:2006:12: warning: no previous prototype for function 'arch_klp_check_breakpoint' [-Wmissing-prototypes]
int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) ^ kernel/livepatch/core.c:2006:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) ^ static kernel/livepatch/core.c:2011:12: warning: no previous prototype for function 'arch_klp_add_breakpoint' [-Wmissing-prototypes] int __weak arch_klp_add_breakpoint(struct arch_klp_data *arch_data, void *old_func) ^ kernel/livepatch/core.c:2011:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __weak arch_klp_add_breakpoint(struct arch_klp_data *arch_data, void *old_func) ^ static kernel/livepatch/core.c:2016:13: warning: no previous prototype for function 'arch_klp_remove_breakpoint' [-Wmissing-prototypes] void __weak arch_klp_remove_breakpoint(struct arch_klp_data *arch_data, void *old_func) ^ kernel/livepatch/core.c:2016:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_klp_remove_breakpoint(struct arch_klp_data *arch_data, void *old_func) ^ static
kernel/livepatch/core.c:2020:13: warning: no previous prototype for function 'arch_klp_set_brk_func' [-Wmissing-prototypes]
void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) ^ kernel/livepatch/core.c:2020:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) ^ static 9 warnings generated.
vim +/arch_klp_check_breakpoint +2006 kernel/livepatch/core.c
2005
2006 int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func)
2007 { 2008 return 0; 2009 } 2010 2011 int __weak arch_klp_add_breakpoint(struct arch_klp_data *arch_data, void *old_func) 2012 { 2013 return -EOPNOTSUPP; 2014 } 2015 2016 void __weak arch_klp_remove_breakpoint(struct arch_klp_data *arch_data, void *old_func) 2017 { 2018 } 2019
2020 void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func)
2021 { 2022 func_node->brk_func = new_func; 2023 } 2024