From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946053AbbEVNd0 (ORCPT ); Fri, 22 May 2015 09:33:26 -0400 Received: from casper.infradead.org ([85.118.1.10]:49333 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756636AbbEVNdS (ORCPT ); Fri, 22 May 2015 09:33:18 -0400 Message-Id: <20150522133136.266991613@infradead.org> User-Agent: quilt/0.61-1 Date: Fri, 22 May 2015 15:29:15 +0200 From: Peter Zijlstra To: mingo@kernel.org, peterz@infradead.org Cc: vincent.weaver@maine.edu, eranian@google.com, jolsa@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/11] perf,x86: Simplify logic References: <20150522132905.416122812@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=peterz-pmu-sched-9.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org !x && y == ! (x || !y) Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/kernel/cpu/perf_event.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -858,9 +858,7 @@ int x86_schedule_events(struct cpu_hw_ev 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]; /*