Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754045AbdHUPXn (ORCPT ); Mon, 21 Aug 2017 11:23:43 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:59764 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754000AbdHUPXl (ORCPT ); Mon, 21 Aug 2017 11:23:41 -0400 From: Brendan Jackman To: linux-kernel@vger.kernel.org Cc: Joel Fernandes , Andres Oportus , Dietmar Eggemann , Vincent Guittot , Josef Bacik , Ingo Molnar , Morten Rasmussen , Peter Zijlstra Subject: [PATCH 1/2] sched/fair: Remove unnecessary comparison with -1 Date: Mon, 21 Aug 2017 16:21:27 +0100 Message-Id: <20170821152128.14418-2-brendan.jackman@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170821152128.14418-1-brendan.jackman@arm.com> References: <20170821152128.14418-1-brendan.jackman@arm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1003 Lines: 29 Since 83a0a96a5f26 (sched/fair: Leverage the idle state info when choosing the "idlest" cpu) find_idlest_cpu no longer returns -1. Signed-off-by: Brendan Jackman Cc: Dietmar Eggemann Cc: Vincent Guittot Cc: Josef Bacik Cc: Ingo Molnar Cc: Morten Rasmussen Cc: Peter Zijlstra --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c95880e216f6..64618d768546 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5934,7 +5934,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f } new_cpu = find_idlest_cpu(group, p, cpu); - if (new_cpu == -1 || new_cpu == cpu) { + if (new_cpu == cpu) { /* Now try balancing at a lower domain level of cpu */ sd = sd->child; continue; -- 2.14.1