Merge remote-tracking branch 'torvalds/master' into perf/core
[platform/kernel/linux-starfive.git] / tools / perf / util / bpf-loader.c
index b3c8174..6e9b06c 100644 (file)
@@ -314,7 +314,7 @@ static void bpf_program_hash_free(void)
                return;
 
        hashmap__for_each_entry(bpf_program_hash, cur, bkt)
-               clear_prog_priv(cur->key, cur->value);
+               clear_prog_priv(cur->pkey, cur->pvalue);
 
        hashmap__free(bpf_program_hash);
        bpf_program_hash = NULL;
@@ -335,13 +335,12 @@ void bpf__clear(void)
        bpf_map_hash_free();
 }
 
-static size_t ptr_hash(const void *__key, void *ctx __maybe_unused)
+static size_t ptr_hash(const long __key, void *ctx __maybe_unused)
 {
-       return (size_t) __key;
+       return __key;
 }
 
-static bool ptr_equal(const void *key1, const void *key2,
-                         void *ctx __maybe_unused)
+static bool ptr_equal(long key1, long key2, void *ctx __maybe_unused)
 {
        return key1 == key2;
 }
@@ -1181,7 +1180,7 @@ static void bpf_map_hash_free(void)
                return;
 
        hashmap__for_each_entry(bpf_map_hash, cur, bkt)
-               bpf_map_priv__clear(cur->key, cur->value);
+               bpf_map_priv__clear(cur->pkey, cur->pvalue);
 
        hashmap__free(bpf_map_hash);
        bpf_map_hash = NULL;