* [PATCH -next] livepatch: Make klp_apply_object_relocs static
@ 2020-05-08 12:06 Samuel Zou
2020-05-08 14:34 ` Kamalesh Babulal
2020-05-08 15:53 ` Josh Poimboeuf
0 siblings, 2 replies; 5+ messages in thread
From: Samuel Zou @ 2020-05-08 12:06 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. Should it be static?
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 related [flat|nested] 5+ messages in thread
* Re: [PATCH -next] livepatch: Make klp_apply_object_relocs static
2020-05-08 12:06 [PATCH -next] livepatch: Make klp_apply_object_relocs static Samuel Zou
@ 2020-05-08 14:34 ` Kamalesh Babulal
2020-05-08 15:53 ` Josh Poimboeuf
1 sibling, 0 replies; 5+ messages in thread
From: Kamalesh Babulal @ 2020-05-08 14:34 UTC (permalink / raw)
To: Samuel Zou, jpoimboe, jikos, mbenes, pmladek, joe.lawrence
Cc: live-patching, linux-kernel
On 5/8/20 5:36 PM, Samuel Zou wrote:
> Fix the following sparse warning:
>
> kernel/livepatch/core.c:748:5: warning: symbol 'klp_apply_object_relocs'
> was not declared. Should it be static?
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Samuel Zou <zou_wei@huawei.com>
LGTM, klp_apply_object_relocs() has only one call site within core.c
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.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;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] livepatch: Make klp_apply_object_relocs static
2020-05-08 12:06 [PATCH -next] livepatch: Make klp_apply_object_relocs static Samuel Zou
2020-05-08 14:34 ` Kamalesh Babulal
@ 2020-05-08 15:53 ` Josh Poimboeuf
2020-05-08 15:55 ` Josh Poimboeuf
1 sibling, 1 reply; 5+ messages in thread
From: Josh Poimboeuf @ 2020-05-08 15:53 UTC (permalink / raw)
To: Samuel Zou
Cc: jikos, mbenes, pmladek, joe.lawrence, live-patching, linux-kernel
On Fri, May 08, 2020 at 08:06:34PM +0800, Samuel Zou wrote:
> Fix the following sparse warning:
>
> kernel/livepatch/core.c:748:5: warning: symbol 'klp_apply_object_relocs'
> was not declared. Should it be static?
Yes, it should :-)
So instead of the question, the patch description should probably state
that it should be static because its only caller is in the file.
With that change:
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
--
Josh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] livepatch: Make klp_apply_object_relocs static
2020-05-08 15:53 ` Josh Poimboeuf
@ 2020-05-08 15:55 ` Josh Poimboeuf
2020-05-09 0:38 ` Samuel Zou
0 siblings, 1 reply; 5+ messages in thread
From: Josh Poimboeuf @ 2020-05-08 15:55 UTC (permalink / raw)
To: Samuel Zou
Cc: jikos, mbenes, pmladek, joe.lawrence, live-patching, linux-kernel
On Fri, May 08, 2020 at 10:53:41AM -0500, Josh Poimboeuf wrote:
> On Fri, May 08, 2020 at 08:06:34PM +0800, Samuel Zou wrote:
> > Fix the following sparse warning:
> >
> > kernel/livepatch/core.c:748:5: warning: symbol 'klp_apply_object_relocs'
> > was not declared. Should it be static?
>
> Yes, it should :-)
>
> So instead of the question, the patch description should probably state
> that it should be static because its only caller is in the file.
... and it probably should also have a Fixes tag which references the
commit which introduced this issue.
> With that change:
>
> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
--
Josh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] livepatch: Make klp_apply_object_relocs static
2020-05-08 15:55 ` Josh Poimboeuf
@ 2020-05-09 0:38 ` Samuel Zou
0 siblings, 0 replies; 5+ messages in thread
From: Samuel Zou @ 2020-05-09 0:38 UTC (permalink / raw)
To: Josh Poimboeuf
Cc: jikos, mbenes, pmladek, joe.lawrence, live-patching, linux-kernel
Hi Josh,
Thanks for your review and reply.
Yes, I just copied and pasted the warning message, so I brought a
question mark.
I will modify the description and add the fixes tag which introduced the
issue, then will send the v2 soon.
On 2020/5/8 23:55, Josh Poimboeuf wrote:
> On Fri, May 08, 2020 at 10:53:41AM -0500, Josh Poimboeuf wrote:
>> On Fri, May 08, 2020 at 08:06:34PM +0800, Samuel Zou wrote:
>>> Fix the following sparse warning:
>>>
>>> kernel/livepatch/core.c:748:5: warning: symbol 'klp_apply_object_relocs'
>>> was not declared. Should it be static?
>>
>> Yes, it should :-)
>>
>> So instead of the question, the patch description should probably state
>> that it should be static because its only caller is in the file.
>
> ... and it probably should also have a Fixes tag which references the
> commit which introduced this issue.
>
>> With that change:
>>
>> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-09 0:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 12:06 [PATCH -next] livepatch: Make klp_apply_object_relocs static Samuel Zou
2020-05-08 14:34 ` Kamalesh Babulal
2020-05-08 15:53 ` Josh Poimboeuf
2020-05-08 15:55 ` Josh Poimboeuf
2020-05-09 0:38 ` Samuel Zou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).