]> Git Repo - linux.git/commitdiff
perf tools: Fix compiler error in util/tool_pmu.c
authorNamhyung Kim <[email protected]>
Mon, 14 Oct 2024 17:34:17 +0000 (10:34 -0700)
committerNamhyung Kim <[email protected]>
Mon, 14 Oct 2024 17:40:30 +0000 (10:40 -0700)
  util/tool_pmu.c: In function 'evsel__tool_pmu_read':
  util/tool_pmu.c:419:55: error: passing argument 2 of 'tool_pmu__read_event' from incompatible pointer type [-Werror=incompatible-pointer-types]
    419 |                         if (!tool_pmu__read_event(ev, &val)) {
        |                                                       ^~~~
        |                                                       |
        |                                                       long unsigned int *
  util/tool_pmu.c:335:56: note: expected 'u64 *' {aka 'long long unsigned int *'} but argument is of type 'long unsigned int *'
    335 | bool tool_pmu__read_event(enum tool_pmu_event ev, u64 *result)
        |                                                   ~~~~~^~~~~~

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
tools/perf/util/tool_pmu.c

index ea9d50f0252023dc7acdb4fb3cf8a4ee50759ed9..bd1cee643eb506df7786c00b23eb0da32e78d751 100644 (file)
@@ -394,7 +394,7 @@ bool tool_pmu__read_event(enum tool_pmu_event ev, u64 *result)
 int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread)
 {
        __u64 *start_time, cur_time, delta_start;
-       unsigned long val;
+       u64 val;
        int fd, err = 0;
        struct perf_counts_values *count, *old_count = NULL;
        bool adjust = false;
This page took 0.077286 seconds and 4 git commands to generate.