diff options
author | Ian Rogers <irogers@google.com> | 2023-08-24 19:39:59 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-08-25 10:22:34 -0300 |
commit | 970ef02e980aea5391d87e425defc5e814823b3a (patch) | |
tree | aee627db0563ad914eaff10c2df7ee1936b4b7ee /tools/perf/tests/pmu.c | |
parent | c091ee90897aacf60aee510464cfc28b4041186f (diff) | |
download | linux-970ef02e980aea5391d87e425defc5e814823b3a.tar.gz linux-970ef02e980aea5391d87e425defc5e814823b3a.tar.bz2 linux-970ef02e980aea5391d87e425defc5e814823b3a.zip |
perf parse-events: Make term's config const
This avoids casts in tests. Use zfree in a few places to avoid
warnings about a freeing a const pointer.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Ming Wang <wangming01@loongson.cn>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: Wei Li <liwei391@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20230825024002.801955-4-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/pmu.c')
-rw-r--r-- | tools/perf/tests/pmu.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/perf/tests/pmu.c b/tools/perf/tests/pmu.c index c204ed1f1a8b..eb60e5f66859 100644 --- a/tools/perf/tests/pmu.c +++ b/tools/perf/tests/pmu.c @@ -28,55 +28,55 @@ static struct test_format { /* Simulated users input. */ static struct parse_events_term test_terms[] = { { - .config = (char *) "krava01", + .config = "krava01", .val.num = 15, .type_val = PARSE_EVENTS__TERM_TYPE_NUM, .type_term = PARSE_EVENTS__TERM_TYPE_USER, }, { - .config = (char *) "krava02", + .config = "krava02", .val.num = 170, .type_val = PARSE_EVENTS__TERM_TYPE_NUM, .type_term = PARSE_EVENTS__TERM_TYPE_USER, }, { - .config = (char *) "krava03", + .config = "krava03", .val.num = 1, .type_val = PARSE_EVENTS__TERM_TYPE_NUM, .type_term = PARSE_EVENTS__TERM_TYPE_USER, }, { - .config = (char *) "krava11", + .config = "krava11", .val.num = 27, .type_val = PARSE_EVENTS__TERM_TYPE_NUM, .type_term = PARSE_EVENTS__TERM_TYPE_USER, }, { - .config = (char *) "krava12", + .config = "krava12", .val.num = 1, .type_val = PARSE_EVENTS__TERM_TYPE_NUM, .type_term = PARSE_EVENTS__TERM_TYPE_USER, }, { - .config = (char *) "krava13", + .config = "krava13", .val.num = 2, .type_val = PARSE_EVENTS__TERM_TYPE_NUM, .type_term = PARSE_EVENTS__TERM_TYPE_USER, }, { - .config = (char *) "krava21", + .config = "krava21", .val.num = 119, .type_val = PARSE_EVENTS__TERM_TYPE_NUM, .type_term = PARSE_EVENTS__TERM_TYPE_USER, }, { - .config = (char *) "krava22", + .config = "krava22", .val.num = 11, .type_val = PARSE_EVENTS__TERM_TYPE_NUM, .type_term = PARSE_EVENTS__TERM_TYPE_USER, }, { - .config = (char *) "krava23", + .config = "krava23", .val.num = 2, .type_val = PARSE_EVENTS__TERM_TYPE_NUM, .type_term = PARSE_EVENTS__TERM_TYPE_USER, |