mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kprobes: Remove unnecessary ‘0’ values from ret
@ 2023-07-04 19:21 Li zeming
  2023-07-06 13:37 ` Masami Hiramatsu
  0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2023-07-04 19:21 UTC (permalink / raw)
  To: naveen.n.rao, anil.s.keshavamurthy, davem, mhiramat
  Cc: linux-kernel, linux-trace-kernel, Li zeming

ret is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/kprobes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 00e177de91cc..db8a3aa53cf6 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1072,7 +1072,7 @@ static int kprobe_ftrace_enabled;
 static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
 			       int *cnt)
 {
-	int ret = 0;
+	int ret;
 
 	lockdep_assert_held(&kprobe_mutex);
 
@@ -1110,7 +1110,7 @@ static int arm_kprobe_ftrace(struct kprobe *p)
 static int __disarm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
 				  int *cnt)
 {
-	int ret = 0;
+	int ret;
 
 	lockdep_assert_held(&kprobe_mutex);
 
-- 
2.18.2


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

* Re: [PATCH] kprobes: Remove unnecessary ‘0’ values from ret
  2023-07-04 19:21 [PATCH] kprobes: Remove unnecessary ‘0’ values from ret Li zeming
@ 2023-07-06 13:37 ` Masami Hiramatsu
  0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2023-07-06 13:37 UTC (permalink / raw)
  To: Li zeming
  Cc: naveen.n.rao, anil.s.keshavamurthy, davem, linux-kernel,
	linux-trace-kernel

On Wed,  5 Jul 2023 03:21:07 +0800
Li zeming <zeming@nfschina.com> wrote:

> ret is assigned first, so it does not need to initialize the assignment.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

Looks good to me.

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

Thank you!

> ---
>  kernel/kprobes.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index 00e177de91cc..db8a3aa53cf6 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -1072,7 +1072,7 @@ static int kprobe_ftrace_enabled;
>  static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
>  			       int *cnt)
>  {
> -	int ret = 0;
> +	int ret;
>  
>  	lockdep_assert_held(&kprobe_mutex);
>  
> @@ -1110,7 +1110,7 @@ static int arm_kprobe_ftrace(struct kprobe *p)
>  static int __disarm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
>  				  int *cnt)
>  {
> -	int ret = 0;
> +	int ret;
>  
>  	lockdep_assert_held(&kprobe_mutex);
>  
> -- 
> 2.18.2
> 


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

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

end of thread, other threads:[~2023-07-06 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 19:21 [PATCH] kprobes: Remove unnecessary ‘0’ values from ret Li zeming
2023-07-06 13:37 ` 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®