mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
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:
parent
0bb024f11d
commit
d71b3ca523
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user