diff mbox

mm/memblock: Replace 0 with NULL for pointer

Message ID 1346747105-658-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat Sept. 4, 2012, 8:25 a.m. UTC
Silences the following sparse warning:
mm/memblock.c:249:49: warning: Using plain integer as NULL pointer

Cc: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 mm/memblock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Tejun Heo Sept. 4, 2012, 7:16 p.m. UTC | #1
On Tue, Sep 04, 2012 at 01:55:05PM +0530, Sachin Kamat wrote:
> Silences the following sparse warning:
> mm/memblock.c:249:49: warning: Using plain integer as NULL pointer
> 
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.
diff mbox

Patch

diff --git a/mm/memblock.c b/mm/memblock.c
index 4d9393c..82aa349 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -246,7 +246,7 @@  static int __init_memblock memblock_double_array(struct memblock_type *type,
 				min(new_area_start, memblock.current_limit),
 				new_alloc_size, PAGE_SIZE);
 
-		new_array = addr ? __va(addr) : 0;
+		new_array = addr ? __va(addr) : NULL;
 	}
 	if (!addr) {
 		pr_err("memblock: Failed to double %s array from %ld to %ld entries !\n",