]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpufreq: armada-8k: Fix parameter type warning
authorGregory CLEMENT <gregory.clement@bootlin.com>
Fri, 15 Dec 2023 15:37:06 +0000 (16:37 +0100)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 18 Dec 2023 05:52:57 +0000 (11:22 +0530)
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

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/armada-8k-cpufreq.c

index 8afefdea4d80c9da11d0762b37ae79475ec305b9..ce5a5641b6dd0efbd4be8554e662d87d76beebf8 100644 (file)
@@ -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);