Skip to content

Commit 4d4d00d

Browse files
committed
perf tools: Update copy of libbpf's hashmap.c
To pick the changes in: fba60b1 ("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>
1 parent 8a96f45 commit 4d4d00d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tools/perf/util/hashmap.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void hashmap__clear(struct hashmap *map)
7575

7676
void hashmap__free(struct hashmap *map)
7777
{
78-
if (!map)
78+
if (IS_ERR_OR_NULL(map))
7979
return;
8080

8181
hashmap__clear(map);
@@ -238,4 +238,3 @@ bool hashmap__delete(struct hashmap *map, const void *key,
238238

239239
return true;
240240
}
241-

0 commit comments

Comments
 (0)