]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf cs-etm: Mute enumeration value warning
authorLeo Yan <leo.yan@arm.com>
Wed, 22 Oct 2025 14:28:49 +0000 (15:28 +0100)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 24 Oct 2025 01:59:13 +0000 (18:59 -0700)
commit3e98f0203e10bc9d379852faf424f769ef5049a6
treedddb2a683dbb477296d71ad570ac03e1f2219a5f
parent9960889b32a45af39c53a46db6fd36ff1fa71a4f
perf cs-etm: Mute enumeration value warning

When the OpenCSD library introduces a new enumeration value (for example,
in the v1.7.1 release), the perf build fails with an error:

  util/cs-etm-decoder/cs-etm-decoder.c:600:10: error: enumeration value 'OCSD_GEN_TRC_ELEM_ITMTRACE' not explicitly handled in switch [-Werror, -Wswitch-enum]
    600 |         switch (elem->elem_type) {
|                 ^~~~~~~~~~~~~~~
  1 error generated.

Convert to if-else sentences to mute the enumeration value warning,
which can avoid build failures whenever the lib is updated.

No functional change.

Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c