linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: Rockchip: Fix use of plain integer as NULL pointer
@ 2016-03-17 11:11 Peter Griffin
  2016-03-17 13:29 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Griffin @ 2016-03-17 11:11 UTC (permalink / raw)
  To: linux-arm-kernel

This fixes the following sparse build warning
mach-rockchip/platsmp.c:68:43: Using plain integer as NULL pointer

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 arch/arm/mach-rockchip/platsmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
index d42a07e..4d827a0 100644
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -65,7 +65,7 @@ static struct reset_control *rockchip_get_core_reset(int cpu)
 	if (dev)
 		np = dev->of_node;
 	else
-		np = of_get_cpu_node(cpu, 0);
+		np = of_get_cpu_node(cpu, NULL);
 
 	return of_reset_control_get(np, NULL);
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ARM: Rockchip: Fix use of plain integer as NULL pointer
  2016-03-17 11:11 [PATCH] ARM: Rockchip: Fix use of plain integer as NULL pointer Peter Griffin
@ 2016-03-17 13:29 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2016-03-17 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

Nit: Subject line doesn't match the preferred format for the sub-arch.

On Thu, 17 Mar 2016, Peter Griffin wrote:

> This fixes the following sparse build warning
> mach-rockchip/platsmp.c:68:43: Using plain integer as NULL pointer

Nit: I would insert a '\n' between your wording and the quoted
warning.  For added clarity, I usually stick a tab before the quote.

> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> ---
>  arch/arm/mach-rockchip/platsmp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch looks good though:

Acked-by: Lee Jones <lee.jones@linaro.org>

> diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
> index d42a07e..4d827a0 100644
> --- a/arch/arm/mach-rockchip/platsmp.c
> +++ b/arch/arm/mach-rockchip/platsmp.c
> @@ -65,7 +65,7 @@ static struct reset_control *rockchip_get_core_reset(int cpu)
>  	if (dev)
>  		np = dev->of_node;
>  	else
> -		np = of_get_cpu_node(cpu, 0);
> +		np = of_get_cpu_node(cpu, NULL);
>  
>  	return of_reset_control_get(np, NULL);
>  }

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-17 13:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-17 11:11 [PATCH] ARM: Rockchip: Fix use of plain integer as NULL pointer Peter Griffin
2016-03-17 13:29 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).