Live-Patching Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next v2] livepatch: Make klp_apply_object_relocs static
@ 2020-05-09  1:16 Samuel Zou
  2020-05-10 22:32 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Zou @ 2020-05-09  1:16 UTC (permalink / raw)
  To: jpoimboe, jikos, mbenes, pmladek, joe.lawrence
  Cc: live-patching, linux-kernel, Samuel Zou

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>
---
 kernel/livepatch/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index 96d2da1..f76fdb9 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;
-- 
2.6.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH -next v2] livepatch: Make klp_apply_object_relocs static
  2020-05-09  1:16 [PATCH -next v2] livepatch: Make klp_apply_object_relocs static Samuel Zou
@ 2020-05-10 22:32 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2020-05-10 22:32 UTC (permalink / raw)
  To: Samuel Zou
  Cc: jpoimboe, mbenes, pmladek, joe.lawrence, live-patching, linux-kernel

On Sat, 9 May 2020, Samuel Zou wrote:

> 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>

Merged in for-5.8/klp-module-fixups branch now. Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09  1:16 [PATCH -next v2] livepatch: Make klp_apply_object_relocs static Samuel Zou
2020-05-10 22:32 ` Jiri Kosina

Live-Patching Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/live-patching/0 live-patching/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 live-patching live-patching/ https://lore.kernel.org/live-patching \
		live-patching@vger.kernel.org
	public-inbox-index live-patching

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.live-patching


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git