On Thu, 14 Jun 2018 13:41:31 -0600 Mathieu Poirier mathieu.poirier@linaro.org wrote:
Introducing function cs_etm_decoder__init_dparams() to avoid repeating code at two different places.
No change of functionatlity is introduced by this patch.
functionality
Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org
tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 3 +- tools/perf/util/cs-etm.c | 41 +++++++++++++++++-------- 2 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h index 108dc9dbb146..faa8bafca3c6 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h @@ -82,9 +82,10 @@ enum { CS_ETM_PROTO_ETMV4d, }; -enum { +enum cs_etm_decoder_operation { CS_ETM_OPERATION_PRINT = 1, CS_ETM_OPERATION_DECODE,
- CS_ETM_OPERATION_MAX,
What does adding a _MAX buy us here? The compiler ought to do the enum check.
Same comment applies for the next patch in this series.
Kikm