Skip to contentSkip to conversation

cpufreq: armada-8k: Fix parameter type warning

PATCH Applied Gregory CLEMENT 3 participants 3 messages Dec 15, 2023 – Dec 18, 2023

Subsystems (2)
lore
Share & tools
lore

Gregory CLEMENT

author maintainer
#0 lore raw

PATCH 1/1 cpufreq: armada-8k: Fix parameter type warning

The second parameter of clk_get() is of type 'const char *', so use NULL instead of the integer 0 to resolve a sparse warning:

drivers/cpufreq/armada-8k-cpufreq.c:60:40: warning: Using plain integer as NULL pointer drivers/cpufreq/armada-8k-cpufreq.c:168:40: warning: Using plain integer as NULL pointer

---
 drivers/cpufreq/armada-8k-cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/armada-8k-cpufreq.c +2 -2
index 8afefdea4d80..ce5a5641b6dd 100644
@@ -57,7 +57,7 @@ static void __init armada_8k_get_sharing_cpus(struct clk *cur_clk,
 			continue;
 		}
 
-		clk = clk_get(cpu_dev, 0);
+		clk = clk_get(cpu_dev, NULL);
 		if (IS_ERR(clk)) {
 			pr_warn("Cannot get clock for CPU %d\n", cpu);
 		} else {
@@ -165,7 +165,7 @@ static int __init armada_8k_cpufreq_init(void)
 			continue;
 		}
 
-		clk = clk_get(cpu_dev, 0);
+		clk = clk_get(cpu_dev, NULL);
 
 		if (IS_ERR(clk)) {
 			pr_err("Cannot get clock for CPU %d\n", cpu);
Signature · 1 line
2.42.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Gregory CLEMENT

The second parameter of clk_get() is of type 'const char *', so use NULL instead of the integer 0 to resolve a sparse warning:

drivers/cpufreq/armada-8k-cpufreq.c:60:40: warning: Using plain integer as NULL pointer drivers/cpufreq/armada-8k-cpufreq.c:168:40: warning: Using plain integer as NULL pointer

Andrew

maintainer Applied
#2 lore raw
In reply to Gregory CLEMENT
Quoted 6 lines · Gregory CLEMENT

The second parameter of clk_get() is of type 'const char *', so use NULL instead of the integer 0 to resolve a sparse warning:

drivers/cpufreq/armada-8k-cpufreq.c:60:40: warning: Using plain integer as NULL pointer drivers/cpufreq/armada-8k-cpufreq.c:168:40: warning: Using plain integer as NULL pointer

Quoted 6 lines
---
 drivers/cpufreq/armada-8k-cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied. Thanks.

Signature · 1 line
viresh