From: Lukasz Luba <lukasz.luba@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: lkp@intel.com, sudeep.holla@arm.com, qyousef@layalina.io,
rafael@kernel.org, linux-kernel@vger.kernel.org,
mingo@redhat.com, peterz@infradead.org,
gregkh@linuxfoundation.org
Subject: Re: [PATCH] arch/topology: Fix variable naming
Date: Thu, 25 Apr 2024 09:11:57 +0100 [thread overview]
Message-ID: <730b8b60-8101-4c93-8e71-74804ef0d314@arm.com> (raw)
In-Reply-To: <20240425073709.379016-1-vincent.guittot@linaro.org>
On 4/25/24 08:37, Vincent Guittot wrote:
> Using hw_pressure for local variable is confusing in regard to the
> per_cpu hw_pressure variable. Rename it to avoid confusion.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202404250740.VhQQoD7N-lkp@intel.com/
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
>
> drivers/base/arch_topology.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index 0248912ff687..c66d070207a0 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -179,7 +179,7 @@ DEFINE_PER_CPU(unsigned long, hw_pressure);
> void topology_update_hw_pressure(const struct cpumask *cpus,
> unsigned long capped_freq)
> {
> - unsigned long max_capacity, capacity, hw_pressure;
> + unsigned long max_capacity, capacity, pressure;
> u32 max_freq;
> int cpu;
>
> @@ -196,12 +196,12 @@ void topology_update_hw_pressure(const struct cpumask *cpus,
> else
> capacity = mult_frac(max_capacity, capped_freq, max_freq);
>
> - hw_pressure = max_capacity - capacity;
> + pressure = max_capacity - capacity;
>
> - trace_hw_pressure_update(cpu, hw_pressure);
> + trace_hw_pressure_update(cpu, pressure);
>
> for_each_cpu(cpu, cpus)
> - WRITE_ONCE(per_cpu(hw_pressure, cpu), hw_pressure);
> + WRITE_ONCE(per_cpu(hw_pressure, cpu), pressure);
> }
> EXPORT_SYMBOL_GPL(topology_update_hw_pressure);
>
Make sense
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
next prev parent reply other threads:[~2024-04-25 8:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 7:37 Vincent Guittot
2024-04-25 8:11 ` Lukasz Luba [this message]
2024-04-25 8:46 ` Sudeep Holla
2024-04-30 12:19 ` Konrad Dybcio
2024-05-15 8:27 ` [tip: sched/urgent] arch/topology: Fix variable naming to avoid shadowing tip-bot2 for Vincent Guittot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=730b8b60-8101-4c93-8e71-74804ef0d314@arm.com \
--to=lukasz.luba@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qyousef@layalina.io \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®