summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2020-10-19 17:26:45 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-04-01 21:19:34 +0200
commit4d4d00dd321f2c9c1ce35ec2a1d32515371af009 (patch)
treee36a4ba1ea4bc4a4a3e53c0e51fb542866210c60
parentperf stat: Avoid SEGV if core.cpus isn't set (diff)
downloadlinux-4d4d00dd321f2c9c1ce35ec2a1d32515371af009.tar.xz
linux-4d4d00dd321f2c9c1ce35ec2a1d32515371af009.zip
perf tools: Update copy of libbpf's hashmap.c
To pick the changes in: fba60b171a032283 ("libbpf: Use IS_ERR_OR_NULL() in hashmap__free()") That don't entail any changes in tools/perf. This addresses this perf build warning: Warning: Kernel ABI header at 'tools/perf/util/hashmap.h' differs from latest version at 'tools/lib/bpf/hashmap.h' diff -u tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h Not a kernel ABI, its just that this uses the mechanism in place for checking kernel ABI files drift. Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mauricio Vásquez <mauricio@kinvolk.io> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lore.kernel.org/lkml/YkMb2SAIai2VeuUD@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/hashmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/hashmap.c b/tools/perf/util/hashmap.c
index 3c20b126d60d..aeb09c288716 100644
--- a/tools/perf/util/hashmap.c
+++ b/tools/perf/util/hashmap.c
@@ -75,7 +75,7 @@ void hashmap__clear(struct hashmap *map)
void hashmap__free(struct hashmap *map)
{
- if (!map)
+ if (IS_ERR_OR_NULL(map))
return;
hashmap__clear(map);
@@ -238,4 +238,3 @@ bool hashmap__delete(struct hashmap *map, const void *key,
return true;
}
-