Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD418C433F5 for ; Thu, 18 Nov 2021 14:16:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DA286113A for ; Thu, 18 Nov 2021 14:16:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232897AbhKROTQ (ORCPT ); Thu, 18 Nov 2021 09:19:16 -0500 Received: from foss.arm.com ([217.140.110.172]:41412 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233041AbhKROSY (ORCPT ); Thu, 18 Nov 2021 09:18:24 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 95F8BD6E; Thu, 18 Nov 2021 06:15:23 -0800 (PST) Received: from localhost.localdomain (FVFF7649Q05P.cambridge.arm.com [10.1.31.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 778DC3F766; Thu, 18 Nov 2021 06:15:22 -0800 (PST) From: Vincent Donnefort To: peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org Cc: linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, valentin.schneider@arm.com, Vincent Donnefort Subject: [PATCH v2 1/2] sched/fair: Fix asym_fits_capacity() task_util type Date: Thu, 18 Nov 2021 14:14:10 +0000 Message-Id: <20211118141411.2623521-1-vincent.donnefort@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org task_util is an unsigned long value, compared with a CPU capacity which is unsigned long as well. There's no need for an intermediate implicit int cast. Fixes: b4c9c9f15649 ("sched/fair: Prefer prev cpu in asymmetric wakeup path") Signed-off-by: Vincent Donnefort Reviewed-by: Vincent Guittot diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 945d987246c5..8fde6e10e24b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6346,7 +6346,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) return best_cpu; } -static inline bool asym_fits_capacity(int task_util, int cpu) +static inline bool asym_fits_capacity(unsigned long task_util, int cpu) { if (static_branch_unlikely(&sched_asym_cpucapacity)) return fits_capacity(task_util, capacity_of(cpu)); -- 2.25.1