mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/kprobes: remove extern from arch_unoptimized_kprobes
@ 2023-03-04 14:15 Tom Rix
  2023-03-06  2:30 ` Masami Hiramatsu
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-03-04 14:15 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen, hpa, mhiramat, yangjihong1, ast, peterz
  Cc: x86, linux-kernel, Tom Rix

smatch reports
arch/x86/kernel/kprobes/opt.c:537:13: warning:
  function 'arch_unoptimize_kprobes' with external linkage has definition

extern is only needed in a declaration, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 arch/x86/kernel/kprobes/opt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
index 57b0037d0a99..1e699deb77fe 100644
--- a/arch/x86/kernel/kprobes/opt.c
+++ b/arch/x86/kernel/kprobes/opt.c
@@ -534,8 +534,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;
 
-- 
2.27.0


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

* Re: [PATCH] x86/kprobes: remove extern from arch_unoptimized_kprobes
  2023-03-04 14:15 [PATCH] x86/kprobes: remove extern from arch_unoptimized_kprobes Tom Rix
@ 2023-03-06  2:30 ` Masami Hiramatsu
  0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2023-03-06  2:30 UTC (permalink / raw)
  To: Tom Rix
  Cc: tglx, mingo, bp, dave.hansen, hpa, yangjihong1, ast, peterz, x86,
	linux-kernel

On Sat,  4 Mar 2023 09:15:44 -0500
Tom Rix <trix@redhat.com> wrote:

> smatch reports
> arch/x86/kernel/kprobes/opt.c:537:13: warning:
>   function 'arch_unoptimize_kprobes' with external linkage has definition
> 
> extern is only needed in a declaration, so remove it.

Thanks for pointing it out! This looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thanks, 

> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  arch/x86/kernel/kprobes/opt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
> index 57b0037d0a99..1e699deb77fe 100644
> --- a/arch/x86/kernel/kprobes/opt.c
> +++ b/arch/x86/kernel/kprobes/opt.c
> @@ -534,8 +534,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;
>  
> -- 
> 2.27.0
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

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

end of thread, other threads:[~2023-03-06  2:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-04 14:15 [PATCH] x86/kprobes: remove extern from arch_unoptimized_kprobes Tom Rix
2023-03-06  2:30 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®