Skip to contentSkip to conversation

cpufreq: tegra194: remove redundant AND with cpu_online_mask

PATCH Applied Sumit Gupta 2 participants 2 messages Oct 9, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: tegra194: remove redundant AND with cpu_online_mask

Remove redundant 'AND' with cpu_online_mask as the policy->cpus always contains only the currently online CPUs.

---
 drivers/cpufreq/tegra194-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/tegra194-cpufreq.c +1 -1
index 386aed3637b4..607e699b3d84 100644
@@ -135,7 +135,7 @@ static void tegra234_set_cpu_ndiv(struct cpufreq_policy *policy, u64 ndiv)
 	u32 cpu, cpuid, clusterid;
 	u64 mpidr_id;
 
-	for_each_cpu_and(cpu, policy->cpus, cpu_online_mask) {
+	for_each_cpu(cpu, policy->cpus) {
 		data->soc->ops->get_cpu_cluster_id(cpu, &cpuid, &clusterid);
 
 		/* use physical id to get address of per core frequency register */
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 15 lines · Sumit Gupta

Remove redundant 'AND' with cpu_online_mask as the policy->cpus always contains only the currently online CPUs.

---
 drivers/cpufreq/tegra194-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/tegra194-cpufreq.c +0 -0
index 386aed3637b4..607e699b3d84 100644

drivers/cpufreq/tegra194-cpufreq.c static void tegra234_set_cpu_ndiv(struct cpufreq_policy *policy, u64 ndiv) · line 141

Quoted 8 lines
drivers/cpufreq/tegra194-cpufreq.c +1 -1
@@ -135,7 +135,7 @@ static void tegra234_set_cpu_ndiv(struct cpufreq_policy *policy, u64 ndiv)
 	u32 cpu, cpuid, clusterid;
 	u64 mpidr_id;
 
-	for_each_cpu_and(cpu, policy->cpus, cpu_online_mask) {
+	for_each_cpu(cpu, policy->cpus) {
 		data->soc->ops->get_cpu_cluster_id(cpu, &cpuid, &clusterid);
 
 		/* use physical id to get address of per core frequency register */

Applied. Thanks.

Signature · 1 line
viresh