summaryrefslogtreecommitdiffstats
path: root/kernel/livepatch
diff options
context:
space:
mode:
authorSamuel Zou <zou_wei@huawei.com>2020-05-09 09:16:41 +0800
committerJiri Kosina <jkosina@suse.cz>2020-05-11 00:31:38 +0200
commita4ae16f65c335f8be58b67b78628c788c4b325a5 (patch)
treece70bb7f20541d1998f7d19aed9d4f5f8a6cf3e3 /kernel/livepatch
parent2a4248749624a38ebddcd1fd82bbab8132d655ad (diff)
downloadlinux-stable-a4ae16f65c335f8be58b67b78628c788c4b325a5.tar.gz
linux-stable-a4ae16f65c335f8be58b67b78628c788c4b325a5.tar.bz2
linux-stable-a4ae16f65c335f8be58b67b78628c788c4b325a5.zip
livepatch: Make klp_apply_object_relocs static
Fix the following sparse warning: kernel/livepatch/core.c:748:5: warning: symbol 'klp_apply_object_relocs' was not declared. The klp_apply_object_relocs() has only one call site within core.c; it should be static Fixes: 7c8e2bdd5f0d ("livepatch: Apply vmlinux-specific KLP relocations early") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Samuel Zou <zou_wei@huawei.com> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'kernel/livepatch')
-rw-r--r--kernel/livepatch/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index 96d2da14eb0d..f76fdb925532 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -745,7 +745,8 @@ static int klp_init_func(struct klp_object *obj, struct klp_func *func)
func->old_sympos ? func->old_sympos : 1);
}
-int klp_apply_object_relocs(struct klp_patch *patch, struct klp_object *obj)
+static int klp_apply_object_relocs(struct klp_patch *patch,
+ struct klp_object *obj)
{
int i, ret;
struct klp_modinfo *info = patch->mod->klp_info;