Commit-ID: 8736e548db0f48244132bc36331496494625bbaf Gitweb: http://git.kernel.org/tip/8736e548db0f48244132bc36331496494625bbaf Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx> AuthorDate: Thu, 21 May 2015 10:57:43 +0200 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitDate: Wed, 27 May 2015 09:17:45 +0200 perf/x86: Simplify the x86_schedule_events() logic !x && y == ! (x || !y) Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Stephane Eranian <eranian@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Vince Weaver <vincent.weaver@xxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> --- arch/x86/kernel/cpu/perf_event.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index d275da3..dbe3328 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]; /* -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |