hulk inclusion category: cleanup bugzilla: https://gitee.com/openeuler/kernel/issues/I9R2TB
--------------------------------
klp_add_func_node() & klp_del_func_node() should be static.
Signed-off-by: Zheng Yejian zhengyejian1@huawei.com --- include/linux/livepatch.h | 2 -- kernel/livepatch/core.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h index 38d707b9b4e1..b11d4afed635 100644 --- a/include/linux/livepatch.h +++ b/include/linux/livepatch.h @@ -239,8 +239,6 @@ struct klp_func_node { void *brk_func; };
-void klp_add_func_node(struct klp_func_node *func_node); -void klp_del_func_node(struct klp_func_node *func_node); void *klp_get_brk_func(void *addr);
static inline diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 2ccd00113085..fdf00f2a6d84 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -1564,12 +1564,12 @@ static struct klp_func_node *klp_find_func_node(const void *old_func) return NULL; }
-void klp_add_func_node(struct klp_func_node *func_node) +static void klp_add_func_node(struct klp_func_node *func_node) { list_add_rcu(&func_node->node, &klp_func_list); }
-void klp_del_func_node(struct klp_func_node *func_node) +static void klp_del_func_node(struct klp_func_node *func_node) { list_del_rcu(&func_node->node); }