]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
livepatch: Make klp_apply_object_relocs static
authorSamuel Zou <zou_wei@huawei.com>
Sat, 9 May 2020 01:16:41 +0000 (09:16 +0800)
committerJiri Kosina <jkosina@suse.cz>
Sun, 10 May 2020 22:31:38 +0000 (00:31 +0200)
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>
kernel/livepatch/core.c

index 96d2da14eb0d51db86803278247ea53e0b077160..f76fdb9255323d809d58495da99882a6710cd855 100644 (file)
@@ -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;