* [PATCH] cpufreq: armada-8k: Fix parameter type warning
@ 2023-12-15 15:37 Gregory CLEMENT
2023-12-15 15:51 ` Andrew Lunn
2023-12-18 5:53 ` Viresh Kumar
0 siblings, 2 replies; 3+ messages in thread
From: Gregory CLEMENT @ 2023-12-15 15:37 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar, linux-pm
Cc: Andrew Lunn, Sebastian Hesselbarth, Gregory CLEMENT,
Thomas Petazzoni, linux-arm-kernel, kernel test robot
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>
Closes: https://lore.kernel.org/oe-kbuild-all/202312141651.lCAXGAZ2-lkp@intel.com/
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
---
drivers/cpufreq/armada-8k-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/armada-8k-cpufreq.c b/drivers/cpufreq/armada-8k-cpufreq.c
index 8afefdea4d80..ce5a5641b6dd 100644
--- a/drivers/cpufreq/armada-8k-cpufreq.c
+++ b/drivers/cpufreq/armada-8k-cpufreq.c
@@ -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);
--
2.42.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cpufreq: armada-8k: Fix parameter type warning
2023-12-15 15:37 [PATCH] cpufreq: armada-8k: Fix parameter type warning Gregory CLEMENT
@ 2023-12-15 15:51 ` Andrew Lunn
2023-12-18 5:53 ` Viresh Kumar
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2023-12-15 15:51 UTC (permalink / raw)
To: Gregory CLEMENT
Cc: Rafael J. Wysocki, Viresh Kumar, linux-pm, Sebastian Hesselbarth,
Thomas Petazzoni, linux-arm-kernel, kernel test robot
On Fri, Dec 15, 2023 at 04:37:06PM +0100, Gregory CLEMENT wrote:
> 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>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312141651.lCAXGAZ2-lkp@intel.com/
> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cpufreq: armada-8k: Fix parameter type warning
2023-12-15 15:37 [PATCH] cpufreq: armada-8k: Fix parameter type warning Gregory CLEMENT
2023-12-15 15:51 ` Andrew Lunn
@ 2023-12-18 5:53 ` Viresh Kumar
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2023-12-18 5:53 UTC (permalink / raw)
To: Gregory CLEMENT
Cc: Rafael J. Wysocki, linux-pm, Andrew Lunn, Sebastian Hesselbarth,
Thomas Petazzoni, linux-arm-kernel, kernel test robot
On 15-12-23, 16:37, Gregory CLEMENT wrote:
> 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>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312141651.lCAXGAZ2-lkp@intel.com/
> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
> ---
> drivers/cpufreq/armada-8k-cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied. Thanks.
--
viresh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-18 5:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15 15:37 [PATCH] cpufreq: armada-8k: Fix parameter type warning Gregory CLEMENT
2023-12-15 15:51 ` Andrew Lunn
2023-12-18 5: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