Skip to contentSkip to conversation

arch: x86: kernel: kprobes: functions with definition should not be declared extern

PATCH In review Emil Goode 3 participants 3 messages Mar 2, 2012 – Mar 3, 2012

Subsystems (2)
lore
Share & tools
lore

Emil Goode

author
#0 lore raw

PATCH 1/1 arch: x86: kernel: kprobes: functions with definition should not be declared extern

sparse warns:
arch/x86/kernel/kprobes.c:1489:13: warning: function 'arch_unoptimize_kprobes' with external linkage has definition

This is my first patch which is why I'm sending it here first to see if I'm doing something wrong. Any advice is greatly appreciated.

---
 arch/x86/kernel/kprobes.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/kprobes.c +2 -2
index 7da647d..f55c28e 100644
@@ -1486,8 +1486,8 @@ static void __kprobes setup_unoptimize_kprobe(struct text_poke_param *tprm,
  * 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;
 	int c = 0;
Signature · 1 line
1.7.9.1
#1 lore raw

Looks good.

Change the subject prefix to: kprobes/x86:
get this by typing:

	git log --pretty=oneline arch/x86/kernel/kprobes.c

Maybe choose a shorter subject. Such as "remove extern from function definition."

Perhaps line wrap the commit log at 72 characters. sparse warns:
arch/x86/kernel/kprobes.c:1489:13: warning:
function 'arch_unoptimize_kprobes' with external linkage has definition

Resend to the people from ./scripts/get_maintainer.pl

regargs,
dan carpenter

#2 lore raw
In reply to Emil Goode

[santosh@localhost linux-next]$ ./scripts/get_maintainer.pl --file arch/x86/kernel/kprobes.c
Thomas Gleixner <[email protected]> (maintainer:X86 ARCHITECTURE...) Ingo Molnar <[email protected]> (maintainer:X86 ARCHITECTURE...,commit_signer:3/4u%)
"H. Peter Anvin" <[email protected]> (maintainer:X86 ARCHITECTURE...) [email protected] (maintainer:X86 ARCHITECTURE...)
Masami Hiramatsu <[email protected]> (commit_signer:3/4u%) Jiri Olsa <[email protected]> (commit_signer:2/4P%)
Josh Stone <[email protected]> (commit_signer:2/4P%) [email protected] (open list)
[santosh@localhost linux-next]$

Please send the patch to above mantainers and cc to "kernel-janitors"

Watch the video tutorial of Greg provided in the following link. Its very useful

http://www.cnx-software.com/2011/08/19/how-to-write-and-submit-a-linux-kernel-patch/

Regards
Santosh

Quoted 17 lines · Dan Carpenter

Looks good.

Change the subject prefix to: kprobes/x86:
get this by typing:
       git log --pretty=oneline arch/x86/kernel/kprobes.c

Maybe choose a shorter subject.  Such as "remove extern from function definition."

Perhaps line wrap the commit log at 72 characters. sparse warns:
arch/x86/kernel/kprobes.c:1489:13: warning:
       function 'arch_unoptimize_kprobes' with external linkage has definition

Quoted 5 lines

Resend to the people from ./scripts/get_maintainer.pl

regargs,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html