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
This commit is contained in:
Thorsten Blum
2026-07-28 10:23:31 +05:30
committed by Madhavan Srinivasan
parent 0bb024f11d
commit d71b3ca523
+1 -4
View File
@@ -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)