diff options
| author | Yu Chien Peter Lin <[email protected]> | 2023-11-30 20:42:11 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-12-06 18:17:08 +0530 |
| commit | e19d419f155fc956902e8333fc4420db4b9a07df (patch) | |
| tree | 1e6bcf6555dd51496f1332e42b7c65e95944f39b /lib/utils | |
| parent | 0308f93dc44a21f11d5b54d449170b4142d9e473 (diff) | |
lib: utils: fdt_pmu: Do not iterate over the fdt_pmu_evt_select table
The valid entry count is tracking by hw_event_count so there
is no need to check the whole table.
Signed-off-by: Yu Chien Peter Lin <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils')
| -rw-r--r-- | lib/utils/fdt/fdt_pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/fdt/fdt_pmu.c b/lib/utils/fdt/fdt_pmu.c index 684981eb..e23e8223 100644 --- a/lib/utils/fdt/fdt_pmu.c +++ b/lib/utils/fdt/fdt_pmu.c @@ -26,7 +26,7 @@ uint64_t fdt_pmu_get_select_value(uint32_t event_idx) int i; struct fdt_pmu_hw_event_select_map *event; - for (i = 0; i < SBI_PMU_HW_EVENT_MAX; i++) { + for (i = 0; i < hw_event_count; i++) { event = &fdt_pmu_evt_select[i]; if (event->eidx == event_idx) return event->select; |
