public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: armada-37xx: stop using 0 as NULL pointer
@ 2023-01-10  3:12 Miles Chen
  2023-01-10  4:02 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Miles Chen @ 2023-01-10  3:12 UTC (permalink / raw)
  To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Rafael J. Wysocki, Viresh Kumar, Matthias Brugger
  Cc: linux-kernel, Miles Chen, linux-arm-kernel, linux-pm,
	linux-mediatek

Use NULL for NULL pointer to fix the following sparse warning:
drivers/cpufreq/armada-37xx-cpufreq.c:448:32: sparse: warning: Using plain integer as NULL pointer

Signed-off-by: Miles Chen <miles.chen@mediatek.com>
---
 drivers/cpufreq/armada-37xx-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c
index c10fc33b29b1..b74289a95a17 100644
--- a/drivers/cpufreq/armada-37xx-cpufreq.c
+++ b/drivers/cpufreq/armada-37xx-cpufreq.c
@@ -445,7 +445,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
 		return -ENODEV;
 	}
 
-	clk = clk_get(cpu_dev, 0);
+	clk = clk_get(cpu_dev, NULL);
 	if (IS_ERR(clk)) {
 		dev_err(cpu_dev, "Cannot get clock for CPU0\n");
 		return PTR_ERR(clk);
-- 
2.18.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] 2+ messages in thread

* Re: [PATCH] cpufreq: armada-37xx: stop using 0 as NULL pointer
  2023-01-10  3:12 [PATCH] cpufreq: armada-37xx: stop using 0 as NULL pointer Miles Chen
@ 2023-01-10  4:02 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2023-01-10  4:02 UTC (permalink / raw)
  To: Miles Chen
  Cc: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Rafael J. Wysocki, Matthias Brugger, linux-kernel,
	linux-arm-kernel, linux-pm, linux-mediatek

On 10-01-23, 11:12, Miles Chen wrote:
> Use NULL for NULL pointer to fix the following sparse warning:
> drivers/cpufreq/armada-37xx-cpufreq.c:448:32: sparse: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Miles Chen <miles.chen@mediatek.com>
> ---
>  drivers/cpufreq/armada-37xx-cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c
> index c10fc33b29b1..b74289a95a17 100644
> --- a/drivers/cpufreq/armada-37xx-cpufreq.c
> +++ b/drivers/cpufreq/armada-37xx-cpufreq.c
> @@ -445,7 +445,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
>  		return -ENODEV;
>  	}
>  
> -	clk = clk_get(cpu_dev, 0);
> +	clk = clk_get(cpu_dev, NULL);
>  	if (IS_ERR(clk)) {
>  		dev_err(cpu_dev, "Cannot get clock for CPU0\n");
>  		return PTR_ERR(clk);

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] 2+ messages in thread

end of thread, other threads:[~2023-01-10  4:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-10  3:12 [PATCH] cpufreq: armada-37xx: stop using 0 as NULL pointer Miles Chen
2023-01-10  4:02 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox