x86/kprobes: functions should not be declared extern
PATCH 1/1 x86/kprobes: functions should not be declared extern
The function declaration in kprobes.h is already marked extern, thus its definition should not have the keyword.
This quiets the following sparse warning:
function 'arch_unoptimize_kprobes' with external linkage has definition
--- arch/x86/kernel/kprobes/opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/kprobes/opt.c +2 -2
@@ -539,8 +539,8 @@ void arch_unoptimize_kprobe(struct optimized_kprobe *op)* Recover original instructions and breakpoints from relative jumps. * Caller must call with locking kprobe_mutex. */ -extern void arch_unoptimize_kprobes (struct list_head *oplist, -struct list_head *done_list) +void arch_unoptimize_kprobes (struct list_head *oplist, +struct list_head *done_list) {struct optimized_kprobe *op, *tmp;
Signature · 1 line
2.31.1
Borislav Petkov
maintainerQuoted 1 line
Subject: Re: [PATCH -next] x86/kprobes: functions should not be declared extern
The condensed patch description in the subject line should start with a uppercase letter and should be written in imperative tone.
Also, the subject is wrong. Hint: "declaration" vs "definition".
Quoted 5 lines · Qiheng Lin
The function declaration in
kprobes.his already marked extern, thus its definition should not have the keyword.This quiets the following sparse warning:
function 'arch_unoptimize_kprobes' with external linkage has definition
This sounds like you're fixing something just because some tool complains and not because there's a real problem you're fixing.
Please rewrite your commit messages to state what the problem is and why you're fixing that problem. The tool output can be used to say something along the lines of "this problem was caught by this tool" but not as "see, tool X complains and creates a warning and I must fix that warning immediately."
Ok?
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 14 lines · Borislav Petkov
Quoted 1 line
Subject: Re: [PATCH -next] x86/kprobes: functions should not be declared extern
The condensed patch description in the subject line should start with a uppercase letter and should be written in imperative tone.
Also, the subject is wrong. Hint: "declaration" vs "definition".
Quoted 5 lines · Qiheng Lin
The function declaration in
kprobes.his already marked extern, thus its definition should not have the keyword.This quiets the following sparse warning:
function 'arch_unoptimize_kprobes' with external linkage has definition
Quoted 8 lines
This sounds like you're fixing something just because some tool complains and not because there's a real problem you're fixing.
Please rewrite your commit messages to state what the problem is and why you're fixing that problem. The tool output can be used to say something along the lines of "this problem was caught by this tool" but not as "see, tool X complains and creates a warning and I must fix that warning immediately."
Thank you for the review. I will send the v2.