Skip to content

Commit 4361251

Browse files
Anshuman Khandualwilldeacon
authored andcommitted
arm_pmu: Drop redundant armpmu->map_event() in armpmu_event_init()
__hw_perf_event_init() already calls armpmu->map_event() callback, and also returns its error code including -ENOENT, along with a debug callout. Hence an additional armpmu->map_event() check for -ENOENT is redundant. Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Mark Rutland <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: Mark Rutland <[email protected]> Signed-off-by: Anshuman Khandual <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 17d5739 commit 4361251

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/perf/arm_pmu.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,6 @@ static int armpmu_event_init(struct perf_event *event)
514514
if (has_branch_stack(event))
515515
return -EOPNOTSUPP;
516516

517-
if (armpmu->map_event(event) == -ENOENT)
518-
return -ENOENT;
519-
520517
return __hw_perf_event_init(event);
521518
}
522519

0 commit comments

Comments
 (0)