cpufreq: armada-37xx: use max() to calculate target_vm
Subsystems (2)
cover cpufreq: armada-37xx: use max() to calculate target_vm
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.
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(-)
Signature · 1 line
2.34.1
PATCH 1/1 cpufreq: armada-37xx: use max() to calculate target_vm
Use max() macro while calculating target_vm to simplify and improve the armada-37xx-cpufreq driver code.
Reported-by kernel test robot <[email protected]>
Reported-by Yang Ruibin <[email protected]>
Signed-off-by Akhilesh Patil <[email protected]>
--- drivers/cpufreq/armada-37xx-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/armada-37xx-cpufreq.c +2 -2
@@ -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);/*
Signature · 1 line
2.34.1
Quoted 11 lines · Akhilesh Patil
Use
max()macro while calculatingtarget_vmto simplify and improve the armada-37xx-cpufreq driver code.Reported-by kernel test robot <[email protected]>Reported-by Yang Ruibin <[email protected]>Signed-off-by Akhilesh Patil <[email protected]>--- drivers/cpufreq/armada-37xx-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied. Thanks.
Signature · 1 line
viresh