Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1359739 > unrolled thread

[PATCH] ARM: Rockchip: Fix use of plain integer as NULL pointer

Started byPeter Griffin <peter.griffin@linaro.org>
First post2016-03-17 12:20 +0100
Last post2016-03-17 14:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM: Rockchip: Fix use of plain integer as NULL pointer Peter Griffin <peter.griffin@linaro.org> - 2016-03-17 12:20 +0100
    Re: [PATCH] ARM: Rockchip: Fix use of plain integer as NULL pointer Lee Jones <lee.jones@linaro.org> - 2016-03-17 14:30 +0100

#1359739 — [PATCH] ARM: Rockchip: Fix use of plain integer as NULL pointer

FromPeter Griffin <peter.griffin@linaro.org>
Date2016-03-17 12:20 +0100
Subject[PATCH] ARM: Rockchip: Fix use of plain integer as NULL pointer
Message-ID<rdE8a-6IF-11@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1359846

FromLee Jones <lee.jones@linaro.org>
Date2016-03-17 14:30 +0100
Message-ID<rdG9Y-7Xh-11@gated-at.bofh.it>
In reply to#1359739
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web