Re: [PATCH v2 7/8] drivers/perf: hisi_pcie: Merge find_related_event() and get_event_idx()

From: Jonathan Cameron
Date: Mon Feb 26 2024 - 10:22:22 EST


On Fri, 23 Feb 2024 18:33:58 +0800
Yicong Yang <yangyicong@xxxxxxxxxx> wrote:

> From: Junhao He <hejunhao3@xxxxxxxxxx>
>
> The function xxx_find_related_event() scan all working events to find
> related events. During this process, we also can find the idle counters.
> If not found related events, return the first idle counter to simplify
> the code.
>
> Signed-off-by: Junhao He <hejunhao3@xxxxxxxxxx>
> Signed-off-by: Yicong Yang <yangyicong@xxxxxxxxxxxxx>
Seems like a small optimization, but worthwhile.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>