From patchwork Fri Jun 16 15:16:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 109203 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1431114vqr; Fri, 16 Jun 2023 08:36:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7P1ZBwbQLtXN6GmPIanw4pRQ9ifyYTMQxDduUlst2KHeoe4kXoTm1VCbufC+R2rSPypKQo X-Received: by 2002:a17:903:22c4:b0:1b0:6e1:4b9f with SMTP id y4-20020a17090322c400b001b006e14b9fmr2177205plg.43.1686929811128; Fri, 16 Jun 2023 08:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686929811; cv=none; d=google.com; s=arc-20160816; b=vVIcJ+7GB+CKa3/LwzpTSksowXzAfFj9jrLx9SCfo4IcbCusbWkc7+uLJJ9VQA6IYq 1cn5E6e1ZmRGUKPhCpK7OXk8Lb4gMvpEftcT6Wm5fmY1ZMWrWfkf76k8fs7U4GKD0wgE TFz4ERG+1sZquOrNjUx9aDB8sLERq2hA6tL6ryYC1E3hRmGgja6dKoW+AEITlXJvui2w MXMYjRwPheovkt4/lMr/EWnfYBaUDpSyDcn4cq1MjV625LtN03KjlQ+shH1PHrdvwxCr YQHDiNtSGjyPothJFr8OkEwhMYs/k90ZT0q4fjomMpa+Wli7+XjPFaXoQufMzQJH5QSX 2f4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=T2X08GY+8je3qIgAuEB7aoFUINAb3BIhnuWZ+7W6UHM=; b=rH3BPlCexRfKREBZz71UyjXEBtYUvRCskybqHVeM4Wq29Qrxh1V191Cs+YAC9y6tII T58MspBbsNTAcq3RM+uO4qQz2HuIVU8ijjYVUIztVfLsmk+lvoJQgeerWpw/i1kdkR79 wmPrzTYEnuXiqMMy8nDk+T/IB6IgD+hYHVWuWpTEkbXcjSg7+qR9tgswxG+zigKzzG3Y jjPB2eywefE4DRKwVVCfrLslxUL6NYYAhcXeYCCQjF0hGQMx/X5H/TC/L0WPfYiYruE/ pARPwA7GITCDG0yWGzgFEbjyhjA0lWFohFMBaoC4A1jjAGxBsyuUc2dl3/7UL06PWohF N8fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1mS2+hNs; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q15-20020a170902dacf00b001b530ede2ebsi1513541plx.119.2023.06.16.08.36.37; Fri, 16 Jun 2023 08:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1mS2+hNs; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345916AbjFPPQw (ORCPT + 99 others); Fri, 16 Jun 2023 11:16:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345700AbjFPPQq (ORCPT ); Fri, 16 Jun 2023 11:16:46 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 980B03590; Fri, 16 Jun 2023 08:16:44 -0700 (PDT) Date: Fri, 16 Jun 2023 15:16:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686928603; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T2X08GY+8je3qIgAuEB7aoFUINAb3BIhnuWZ+7W6UHM=; b=1mS2+hNsg8EjxouaUGM6POvlbWuURlGOeAXX/6Z7a9wsO1HzzFqNyCUp1PaRJNGZInT1I0 qizOSEhLKAW2KWrGznlc2xd4N4vWqx/tVZBlQiCK2Xy4MfU3r9Z23GCk6AAViOrw8D5Lbg ZnBkC8pdn9QD2PVGSeSywRRwVIi1FVUKm4yEKm72v6x6S4NIc1eWTXgNfw22mVxOSmoN8O 090/3FjitJBJDU7+joI/GG1mG4XPkslVLAFlUBJQoyWXmEBtEk6HY3fNaVAJX6r1SrLJ+e K8HBBj7XBRC39NaE+ihkQ1Fiy3Aj6G5GJfALmiH6ivOghoje6vTmFumU56W26Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686928603; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T2X08GY+8je3qIgAuEB7aoFUINAb3BIhnuWZ+7W6UHM=; b=cVkHiXdcXgRkHiGge5BLxf9ikfsxikbq6nu2VxzWvXaoeUgOlC8jzvBD/MbXhKCqW45+YA BPi1r8h3JKOLCrAQ== From: "tip-bot2 for Tom Rix" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: Rename variable cpu_util eff_util Cc: Tom Rix , "Peter Zijlstra (Intel)" , Valentin Schneider , Dietmar Eggemann , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230611122535.183654-1-trix@redhat.com> References: <20230611122535.183654-1-trix@redhat.com> MIME-Version: 1.0 Message-ID: <168692860274.404.124512830013535834.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768770920158591451?= X-GMAIL-MSGID: =?utf-8?q?1768874113952915163?= The following commit has been merged into the sched/core branch of tip: Commit-ID: a707df30c9438a9d4d0a43ae7f22b59b078f94c4 Gitweb: https://git.kernel.org/tip/a707df30c9438a9d4d0a43ae7f22b59b078f94c4 Author: Tom Rix AuthorDate: Sun, 11 Jun 2023 08:25:35 -04:00 Committer: Peter Zijlstra CommitterDate: Fri, 16 Jun 2023 17:08:01 +02:00 sched/fair: Rename variable cpu_util eff_util cppcheck reports kernel/sched/fair.c:7436:17: style: Local variable 'cpu_util' shadows outer function [shadowFunction] unsigned long cpu_util; ^ Clean this up by renaming the variable to eff_util Signed-off-by: Tom Rix Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20230611122535.183654-1-trix@redhat.com --- kernel/sched/fair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6189d1a..7666dbc 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7433,7 +7433,7 @@ eenv_pd_max_util(struct energy_env *eenv, struct cpumask *pd_cpus, for_each_cpu(cpu, pd_cpus) { struct task_struct *tsk = (cpu == dst_cpu) ? p : NULL; unsigned long util = cpu_util(cpu, p, dst_cpu, 1); - unsigned long cpu_util; + unsigned long eff_util; /* * Performance domain frequency: utilization clamping @@ -7442,8 +7442,8 @@ eenv_pd_max_util(struct energy_env *eenv, struct cpumask *pd_cpus, * NOTE: in case RT tasks are running, by default the * FREQUENCY_UTIL's utilization can be max OPP. */ - cpu_util = effective_cpu_util(cpu, util, FREQUENCY_UTIL, tsk); - max_util = max(max_util, cpu_util); + eff_util = effective_cpu_util(cpu, util, FREQUENCY_UTIL, tsk); + max_util = max(max_util, eff_util); } return min(max_util, eenv->cpu_cap);