All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/memblock: Replace 0 with NULL for pointer
@ 2012-09-04  8:25 Sachin Kamat
  2012-09-04 19:16 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2012-09-04  8:25 UTC (permalink / raw)
  To: linux-mm; +Cc: sachin.kamat, patches, Tejun Heo, Andrew Morton, Ingo Molnar

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(-)

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",
-- 
1.7.4.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm/memblock: Replace 0 with NULL for pointer
  2012-09-04  8:25 [PATCH] mm/memblock: Replace 0 with NULL for pointer Sachin Kamat
@ 2012-09-04 19:16 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2012-09-04 19:16 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-mm, patches, Andrew Morton, Ingo Molnar

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.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2012-09-04 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-04  8:25 [PATCH] mm/memblock: Replace 0 with NULL for pointer Sachin Kamat
2012-09-04 19:16 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.