diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-07-04 14:13:54 +0200 |
|---|---|---|
| committer | Madhavan Srinivasan <maddy@linux.ibm.com> | 2026-07-28 10:23:31 +0530 |
| commit | d71b3ca5231750fecdefb3390595e7db30979ac4 (patch) | |
| tree | 7f7ec01ce80d0b2f34cd405ac1545c3c63bac32a | |
| parent | 0bb024f11d120abff3e8db9144a585b9d7fb8459 (diff) | |
| download | linux-next-d71b3ca5231750fecdefb3390595e7db30979ac4.tar.gz linux-next-d71b3ca5231750fecdefb3390595e7db30979ac4.zip | |
powerpc/perf: Use strstarts() to simplify is_thread_imc_pmu()
Replace the open-coded implementation with strstarts() to simplify
is_thread_imc_pmu().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Athira Rajeev <atrajeev@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260704121353.201583-3-thorsten.blum@linux.dev
| -rw-r--r-- | arch/powerpc/perf/imc-pmu.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index e3822f36c419..1d2db6d3e226 100644 --- a/arch/powerpc/perf/imc-pmu.c +++ b/arch/powerpc/perf/imc-pmu.c @@ -1023,10 +1023,7 @@ static int thread_imc_event_init(struct perf_event *event) static bool is_thread_imc_pmu(struct perf_event *event) { - if (!strncmp(event->pmu->name, "thread_imc", strlen("thread_imc"))) - return true; - - return false; + return strstarts(event->pmu->name, "thread_imc"); } static __be64 *get_event_base_addr(struct perf_event *event) |
