]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/histograms: Simplify create_hist_fields()
authorZheng Yejian <zhengyejian1@huawei.com>
Thu, 30 Jun 2022 01:31:52 +0000 (09:31 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 12 Jul 2022 21:35:11 +0000 (17:35 -0400)
commit125f4f399776a3a3ae002277252318b58413aac1
tree13472bcbcfa23c7773b50771a4006b6675bbf30b
parent9531b1469a34b652fa67c5b6b4ba8ab1cf43001c
tracing/histograms: Simplify create_hist_fields()

When I look into implements of create_hist_fields(), I think there can be
following two simplifications:
  1. If something wrong happened in parse_var_defs(), free_var_defs() would
     have been called in it, so no need goto free again after calling it;
  2. After calling create_key_fields(), regardless of the value of 'ret', it
     then always runs into 'out: ', so the judge of 'ret' is redundant.

Link: https://lkml.kernel.org/r/20220630013152.164871-1-zhengyejian1@huawei.com
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c