]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86: Remove temporary pmu assignment in event_init
authorKan Liang <kan.liang@linux.intel.com>
Mon, 12 Apr 2021 14:30:54 +0000 (07:30 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 19 Apr 2021 18:03:27 +0000 (20:03 +0200)
commit57d4324ccb064f8b50db069607ef6fa0a036a4cd
tree6acf29cc450b0a70b457eea2f3bab06ae59f4004
parent8eae8ec28d2c6964c4a3f845951fb8ef89e4789f
perf/x86: Remove temporary pmu assignment in event_init

The temporary pmu assignment in event_init is unnecessary.

The assignment was introduced by commit 77c601613804 ("perf_events:
Add fast-path to the rescheduling code"). At that time, event->pmu is
not assigned yet when initializing an event. The assignment is required.
However, from commit 4c2f5cd14214 ("perf: provide PMU when initing
events"), the event->pmu is provided before event_init is invoked.
The temporary pmu assignment in event_init should be removed.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Link: https://lkml.kernel.org/r/1618237865-33448-15-git-send-email-kan.liang@linux.intel.com
arch/x86/events/core.c