summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/perf_event.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-05-21 10:57:43 +0200
committerIngo Molnar <mingo@kernel.org>2015-05-27 09:17:45 +0200
commit8736e548db0f48244132bc36331496494625bbaf (patch)
tree63c960cd72bf2a92daf86cbe1c7589ee0d2a3662 /arch/x86/kernel/cpu/perf_event.c
parent43ef205bded025432f5eeeb3503c11fe5cd1913e (diff)
perf/x86: Simplify the x86_schedule_events() logic
!x && y == ! (x || !y) Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.c')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index d275da3d81dd..dbe3328f8ad7 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -881,9 +881,7 @@ int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
if (x86_pmu.commit_scheduling)
x86_pmu.commit_scheduling(cpuc, i, assign[i]);
}
- }
-
- if (!assign || unsched) {
+ } else {
for (i = 0; i < n; i++) {
e = cpuc->event_list[i];
/*