[3/4] tracing: Remove useless code in dynevent_arg_pair_add()
diff mbox series

Message ID 7880a1268217886cdba7035526650195668da856.1580506712.git.zanussi@kernel.org
State New
Headers show
Series
  • [1/4] tracing: Consolidate some synth_event_trace code
Related show

Commit Message

Tom Zanussi Jan. 31, 2020, 9:55 p.m. UTC
The final addition to q is unnecessary, since q isn't ever used
afterwards.

Signed-off-by: Tom Zanussi <zanussi@kernel.org>
---
 kernel/trace/trace_dynevent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Masami Hiramatsu Feb. 1, 2020, 7:28 a.m. UTC | #1
On Fri, 31 Jan 2020 15:55:33 -0600
Tom Zanussi <zanussi@kernel.org> wrote:

> The final addition to q is unnecessary, since q isn't ever used
> afterwards.
> 

Yeah, thanks for updating :)

Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>

Thank you,


> Signed-off-by: Tom Zanussi <zanussi@kernel.org>
> ---
>  kernel/trace/trace_dynevent.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_dynevent.c b/kernel/trace/trace_dynevent.c
> index f9cfcdc9d1f3..204275ec8d71 100644
> --- a/kernel/trace/trace_dynevent.c
> +++ b/kernel/trace/trace_dynevent.c
> @@ -322,7 +322,7 @@ int dynevent_arg_pair_add(struct dynevent_cmd *cmd,
>  		pr_err("field string is too long: %s\n", arg_pair->rhs);
>  		return -E2BIG;
>  	}
> -	cmd->remaining -= delta; q += delta;
> +	cmd->remaining -= delta;
>  
>  	return ret;
>  }
> -- 
> 2.14.1
>

Patch
diff mbox series

diff --git a/kernel/trace/trace_dynevent.c b/kernel/trace/trace_dynevent.c
index f9cfcdc9d1f3..204275ec8d71 100644
--- a/kernel/trace/trace_dynevent.c
+++ b/kernel/trace/trace_dynevent.c
@@ -322,7 +322,7 @@  int dynevent_arg_pair_add(struct dynevent_cmd *cmd,
 		pr_err("field string is too long: %s\n", arg_pair->rhs);
 		return -E2BIG;
 	}
-	cmd->remaining -= delta; q += delta;
+	cmd->remaining -= delta;
 
 	return ret;
 }