]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
perf/x86: Simplify the x86_schedule_events() logic
authorPeter Zijlstra <peterz@infradead.org>
Thu, 21 May 2015 08:57:43 +0000 (10:57 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 07:17:45 +0000 (09:17 +0200)
!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>
arch/x86/kernel/cpu/perf_event.c

index d275da3d81dde2e23c1d4ce35859315bc27b903f..dbe3328f8ad7746172717f274cc52e2d26219013 100644 (file)
@@ -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];
                        /*