From patchwork Thu Jun 15 11:38:13 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: 108459 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp588046vqr; Thu, 15 Jun 2023 05:16:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59fINnLYCR9oQiEP6byFQbeU3i1vW2a3wxDxLmm2fDH4Nd5xFxxhUFnX8uQbtZ6AYhT91F X-Received: by 2002:a17:903:41ce:b0:1b5:21b0:1490 with SMTP id u14-20020a17090341ce00b001b521b01490mr697847ple.29.1686831398331; Thu, 15 Jun 2023 05:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686831398; cv=none; d=google.com; s=arc-20160816; b=CZ4598wp73stwPtghMrq7CCfbM6MUkQtqE7rLNgxeSUR6+ueOBA1JNwV+uA+wPukBg mzO8UQKxPJgMFz0Y8ipx6i2NN4YJrtTfiDZQ3+SeGspy/Jtpj/xC/hc8EV90Acxwm/0i tw2YKyajzOv0piWsEcutr+H8ka493r3Q6bJoDy4Y0/UD8lLS7pOc0fk0VauZAwVB1052 EROM+rStOiV67YEZX4jn2/zHnUhsR15+crA/bWuAsq3pS5eWWWKj2ydg+y7NqPmdhwuK ah2XGUmzXMlvSGT+IcNXc9HsijuPvZSfWXdYervI6+1V66IfYHpwc2hpgrzORel7aH88 zD+A== 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=jjyYguGFs2U0Ix82lCRk+pLP0T2H4echqzZFEN6s9bk=; b=uxxkrqneHU+rRcHK86YgZNdnxPpj13sO2m6dvRT+jtXFVtMWzF9aIClf2xxJH+Lf1S oA7ZYX7Wph8YQ43ycXImk6D4txTmz/ZFk6604cNxmoEB7XRib9wE7nK9AFQJgVuItT/R KKskptvwHx5g0SZ59L1Qe1kWVGX8/oVlDYVivGXeaoTp+i0uYLmDo31Fv/vJkJU7TVzT DksTdOBdvW6vJwldYhcjPUIiobI9m5jTgVMdJ2sfin7ssYMHaydLxK4duKn/lFHorV05 1FzndBjFsQ3fkg4KnMaDJpuKzF3U1dKJd0n4wHDBh1D4tWSY8/pTl/v4YvmPE8ZVyTVu SQEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=upOY2LIF; 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 b4-20020a170902d50400b001ac83d28c39si13741952plg.234.2023.06.15.05.16.24; Thu, 15 Jun 2023 05:16:38 -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=upOY2LIF; 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 S238645AbjFOLjp (ORCPT + 99 others); Thu, 15 Jun 2023 07:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343975AbjFOLi4 (ORCPT ); Thu, 15 Jun 2023 07:38:56 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A014D30F4; Thu, 15 Jun 2023 04:38:15 -0700 (PDT) Date: Thu, 15 Jun 2023 11:38:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686829094; 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=jjyYguGFs2U0Ix82lCRk+pLP0T2H4echqzZFEN6s9bk=; b=upOY2LIFtTZbLWuUZgUZWjkHa94EVsAj6nIsEUcLBOj+Po/sWDPKlIqSfVbb++oBRJ/uAo E6paPglz7O2Y8duzJ53kY2riU4AbPRTN5ovqVSScFPK5NU+Dwo7GOjZJQcbW1jNZF2Uw6V czG5x8GCzo/DQVZuFrw37Xb+e/UEK79+o7C9NoQ+YFUaFLzDxSmP2NKW09DthqisSlwId0 8rbz3lCXuEAyCs1uZU1MbsfNPO6jw5gAAl6YtiC0bBVCwGDI4uauf2OV8iEsQ5KpnMnO31 g+R7bvD7MgBWN4MRPWx9fgys7XQ4o2ce+TZbbGbSrN6gAgSPb1oHStSzsPM+yQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686829094; 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=jjyYguGFs2U0Ix82lCRk+pLP0T2H4echqzZFEN6s9bk=; b=nf4Z/FOlGTKv9UYFnkIhj83aLhTTp7GbSKOdnwi5sKj5xVFq5F5rJOXx2jO+UzoUDf1Que Kmu+l3rn1QrwRXDQ== 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: <168682909369.404.14833174104608297588.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 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?1768770920158591451?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 24cce6bc14759bbddd8d2252d733212e1911b977 Gitweb: https://git.kernel.org/tip/24cce6bc14759bbddd8d2252d733212e1911b977 Author: Tom Rix AuthorDate: Sun, 11 Jun 2023 08:25:35 -04:00 Committer: Peter Zijlstra CommitterDate: Thu, 15 Jun 2023 13:28:20 +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 819efad..0219cf8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7463,7 +7463,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 @@ -7472,8 +7472,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);