* [PATCH 0/1] cpufreq: armada-37xx: use max() to calculate target_vm
@ 2025-08-09 14:16 Akhilesh Patil
2025-08-09 14:16 ` [PATCH 1/1] " Akhilesh Patil
0 siblings, 1 reply; 3+ messages in thread
From: Akhilesh Patil @ 2025-08-09 14:16 UTC (permalink / raw)
To: andrew, gregory.clement, sebastian.hesselbarth, rafael,
viresh.kumar
Cc: linux-arm-kernel, linux-pm, linux-kernel, akhileshpatilvnit,
skhan
This patch is motivated from previous patch [1]. As per discussion in [2],
I have tested the patch for build and no additional include files are
needed. Build works fine. This change is also reported by kernel test
robot.
Link: https://lore.kernel.org/lkml/20240822074548.1365390-1-11162571@vivo.com/ [1]
Link: https://lore.kernel.org/lkml/2c55fb07-b29e-43e0-8697-f75d1f0df89a@vivo.com/ [2]
Akhilesh Patil (1):
cpufreq: armada-37xx: use max() to calculate target_vm
drivers/cpufreq/armada-37xx-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] cpufreq: armada-37xx: use max() to calculate target_vm
2025-08-09 14:16 [PATCH 0/1] cpufreq: armada-37xx: use max() to calculate target_vm Akhilesh Patil
@ 2025-08-09 14:16 ` Akhilesh Patil
2025-08-11 6:53 ` Viresh Kumar
0 siblings, 1 reply; 3+ messages in thread
From: Akhilesh Patil @ 2025-08-09 14:16 UTC (permalink / raw)
To: andrew, gregory.clement, sebastian.hesselbarth, rafael,
viresh.kumar
Cc: linux-arm-kernel, linux-pm, linux-kernel, akhileshpatilvnit,
skhan
Use max() macro while calculating target_vm to simplify and improve the
armada-37xx-cpufreq driver code.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202503251256.rrl65HgY-lkp@intel.com/
Reported-by: Yang Ruibin <11162571@vivo.com>
Closes: https://lore.kernel.org/lkml/2c55fb07-b29e-43e0-8697-f75d1f0df89a@vivo.com/
Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
---
drivers/cpufreq/armada-37xx-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c
index f28a4435fba7..0efe403a5980 100644
--- a/drivers/cpufreq/armada-37xx-cpufreq.c
+++ b/drivers/cpufreq/armada-37xx-cpufreq.c
@@ -265,7 +265,7 @@ static void __init armada37xx_cpufreq_avs_configure(struct regmap *base,
*/
target_vm = avs_map[l0_vdd_min] - 100;
- target_vm = target_vm > MIN_VOLT_MV ? target_vm : MIN_VOLT_MV;
+ target_vm = max(target_vm, MIN_VOLT_MV);
dvfs->avs[1] = armada_37xx_avs_val_match(target_vm);
/*
@@ -273,7 +273,7 @@ static void __init armada37xx_cpufreq_avs_configure(struct regmap *base,
* be larger than 1000mv
*/
target_vm = avs_map[l0_vdd_min] - 150;
- target_vm = target_vm > MIN_VOLT_MV ? target_vm : MIN_VOLT_MV;
+ target_vm = max(target_vm, MIN_VOLT_MV);
dvfs->avs[2] = dvfs->avs[3] = armada_37xx_avs_val_match(target_vm);
/*
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] cpufreq: armada-37xx: use max() to calculate target_vm
2025-08-09 14:16 ` [PATCH 1/1] " Akhilesh Patil
@ 2025-08-11 6:53 ` Viresh Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2025-08-11 6:53 UTC (permalink / raw)
To: Akhilesh Patil
Cc: andrew, gregory.clement, sebastian.hesselbarth, rafael,
linux-arm-kernel, linux-pm, linux-kernel, akhileshpatilvnit,
skhan
On 09-08-25, 19:46, Akhilesh Patil wrote:
> Use max() macro while calculating target_vm to simplify and improve the
> armada-37xx-cpufreq driver code.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/r/202503251256.rrl65HgY-lkp@intel.com/
> Reported-by: Yang Ruibin <11162571@vivo.com>
> Closes: https://lore.kernel.org/lkml/2c55fb07-b29e-43e0-8697-f75d1f0df89a@vivo.com/
> Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
> ---
> drivers/cpufreq/armada-37xx-cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied. Thanks.
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-11 6:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-09 14:16 [PATCH 0/1] cpufreq: armada-37xx: use max() to calculate target_vm Akhilesh Patil
2025-08-09 14:16 ` [PATCH 1/1] " Akhilesh Patil
2025-08-11 6:53 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).