All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] genalloc: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
@ 2013-08-29 22:31 Joe Perches
  2013-08-29 22:31   ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2013-08-29 22:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton

Use the helper function instead of __GFP_ZERO.

Signed-off-by: Joe Perches <joe@perches.com>
---
 lib/genalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/genalloc.c b/lib/genalloc.c
index e57cc70..26cf20b 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -187,7 +187,7 @@ int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, phys_addr_t phy
 	int nbytes = sizeof(struct gen_pool_chunk) +
 				BITS_TO_LONGS(nbits) * sizeof(long);
 
-	chunk = kmalloc_node(nbytes, GFP_KERNEL | __GFP_ZERO, nid);
+	chunk = kzalloc_node(nbytes, GFP_KERNEL, nid);
 	if (unlikely(chunk == NULL))
 		return -ENOMEM;
 
-- 
1.8.1.2.459.gbcd45b4.dirty


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

* [PATCH 2/2] mempool: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
  2013-08-29 22:31 [PATCH 1/2] genalloc: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...) Joe Perches
@ 2013-08-29 22:31   ` Joe Perches
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2013-08-29 22:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, linux-mm

Use the helper function instead of __GFP_ZERO.

Signed-off-by: Joe Perches <joe@perches.com>
---
 mm/mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mempool.c b/mm/mempool.c
index 5499047..659aa42 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -73,7 +73,7 @@ mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
 			       gfp_t gfp_mask, int node_id)
 {
 	mempool_t *pool;
-	pool = kmalloc_node(sizeof(*pool), gfp_mask | __GFP_ZERO, node_id);
+	pool = kzalloc_node(sizeof(*pool), gfp_mask, node_id);
 	if (!pool)
 		return NULL;
 	pool->elements = kmalloc_node(min_nr * sizeof(void *),
-- 
1.8.1.2.459.gbcd45b4.dirty

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

* [PATCH 2/2] mempool: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
@ 2013-08-29 22:31   ` Joe Perches
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2013-08-29 22:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, linux-mm

Use the helper function instead of __GFP_ZERO.

Signed-off-by: Joe Perches <joe@perches.com>
---
 mm/mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mempool.c b/mm/mempool.c
index 5499047..659aa42 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -73,7 +73,7 @@ mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
 			       gfp_t gfp_mask, int node_id)
 {
 	mempool_t *pool;
-	pool = kmalloc_node(sizeof(*pool), gfp_mask | __GFP_ZERO, node_id);
+	pool = kzalloc_node(sizeof(*pool), gfp_mask, node_id);
 	if (!pool)
 		return NULL;
 	pool->elements = kmalloc_node(min_nr * sizeof(void *),
-- 
1.8.1.2.459.gbcd45b4.dirty


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

* Re: [PATCH 2/2] mempool: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
  2013-08-29 22:31   ` Joe Perches
  (?)
@ 2013-09-05  5:51   ` Wanpeng Li
  -1 siblings, 0 replies; 5+ messages in thread
From: Wanpeng Li @ 2013-09-05  5:51 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Andrew Morton, linux-mm

On Thu, Aug 29, 2013 at 03:31:19PM -0700, Joe Perches wrote:
>Use the helper function instead of __GFP_ZERO.
>

Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>

>Signed-off-by: Joe Perches <joe@perches.com>
>---
> mm/mempool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/mm/mempool.c b/mm/mempool.c
>index 5499047..659aa42 100644
>--- a/mm/mempool.c
>+++ b/mm/mempool.c
>@@ -73,7 +73,7 @@ mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
> 			       gfp_t gfp_mask, int node_id)
> {
> 	mempool_t *pool;
>-	pool = kmalloc_node(sizeof(*pool), gfp_mask | __GFP_ZERO, node_id);
>+	pool = kzalloc_node(sizeof(*pool), gfp_mask, node_id);
> 	if (!pool)
> 		return NULL;
> 	pool->elements = kmalloc_node(min_nr * sizeof(void *),
>-- 
>1.8.1.2.459.gbcd45b4.dirty
>
>--
>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>

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

* Re: [PATCH 2/2] mempool: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
  2013-08-29 22:31   ` Joe Perches
  (?)
  (?)
@ 2013-09-05  5:51   ` Wanpeng Li
  -1 siblings, 0 replies; 5+ messages in thread
From: Wanpeng Li @ 2013-09-05  5:51 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Andrew Morton, linux-mm

On Thu, Aug 29, 2013 at 03:31:19PM -0700, Joe Perches wrote:
>Use the helper function instead of __GFP_ZERO.
>

Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>

>Signed-off-by: Joe Perches <joe@perches.com>
>---
> mm/mempool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/mm/mempool.c b/mm/mempool.c
>index 5499047..659aa42 100644
>--- a/mm/mempool.c
>+++ b/mm/mempool.c
>@@ -73,7 +73,7 @@ mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
> 			       gfp_t gfp_mask, int node_id)
> {
> 	mempool_t *pool;
>-	pool = kmalloc_node(sizeof(*pool), gfp_mask | __GFP_ZERO, node_id);
>+	pool = kzalloc_node(sizeof(*pool), gfp_mask, node_id);
> 	if (!pool)
> 		return NULL;
> 	pool->elements = kmalloc_node(min_nr * sizeof(void *),
>-- 
>1.8.1.2.459.gbcd45b4.dirty
>
>--
>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>

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

end of thread, other threads:[~2013-09-05  5:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 22:31 [PATCH 1/2] genalloc: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...) Joe Perches
2013-08-29 22:31 ` [PATCH 2/2] mempool: " Joe Perches
2013-08-29 22:31   ` Joe Perches
2013-09-05  5:51   ` Wanpeng Li
2013-09-05  5:51   ` Wanpeng Li

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.