From: Peter Zijlstra Date: Thu, 21 May 2015 08:57:43 +0000 (+0200) Subject: perf/x86: Simplify the x86_schedule_events() logic X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8736e548db0f48244132bc36331496494625bbaf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf/x86: Simplify the x86_schedule_events() logic !x && y == ! (x || !y) Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar --- 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]; /*