]> www.infradead.org Git - linux.git/commitdiff
perf tools: Remove unnecessary parentheses
authorNamhyung Kim <namhyung@kernel.org>
Wed, 9 Oct 2024 20:20:09 +0000 (13:20 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Mon, 14 Oct 2024 19:04:31 +0000 (12:04 -0700)
The hashmap API used to require parentheses for the hashmap argument if
it's not a pointer type.  It's now fixed so let's drop the parentheses.

Link: https://lore.kernel.org/r/20241009202009.884884-2-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/threads.c

index ff2b169e0085ed773125263a67782291d0f0f8fb..6ca0b178fb6c3a9d72d2bb25c5501ea7239548a1 100644 (file)
@@ -141,7 +141,7 @@ void threads__remove_all_threads(struct threads *threads)
 
                down_write(&table->lock);
                __threads_table_entry__set_last_match(table, NULL);
-               hashmap__for_each_entry_safe((&table->shard), cur, tmp, bkt) {
+               hashmap__for_each_entry_safe(&table->shard, cur, tmp, bkt) {
                        struct thread *old_value;
 
                        hashmap__delete(&table->shard, cur->key, /*old_key=*/NULL, &old_value);
@@ -175,7 +175,7 @@ int threads__for_each_thread(struct threads *threads,
                size_t bkt;
 
                down_read(&table->lock);
-               hashmap__for_each_entry((&table->shard), cur, bkt) {
+               hashmap__for_each_entry(&table->shard, cur, bkt) {
                        int rc = fn((struct thread *)cur->pvalue, data);
 
                        if (rc != 0) {