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 9F251C433FE for ; Thu, 18 Nov 2021 11:02:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84B7861B64 for ; Thu, 18 Nov 2021 11:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343575AbhKRLF3 (ORCPT ); Thu, 18 Nov 2021 06:05:29 -0500 Received: from foss.arm.com ([217.140.110.172]:39436 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343538AbhKRLFU (ORCPT ); Thu, 18 Nov 2021 06:05:20 -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 4ADA11FB; Thu, 18 Nov 2021 03:02:20 -0800 (PST) Received: from localhost.localdomain (unknown [10.57.45.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3802E3F5A1; Thu, 18 Nov 2021 03:02:19 -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] sched/fair: Fix asym_fits_capacity() task_util type Date: Thu, 18 Nov 2021 11:01:52 +0000 Message-Id: <20211118110152.2598200-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 intermidiate implicit int cast. Fixes: b4c9c9f15649 ("sched/fair: Prefer prev cpu in asymmetric wakeup path") Signed-off-by: Vincent Donnefort 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