linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ksm: Remove redundant __GFP_ZERO from kcalloc
@ 2013-08-29 23:32 Joe Perches
  2013-09-05  5:50 ` Wanpeng Li
  2013-09-05  5:50 ` Wanpeng Li
  0 siblings, 2 replies; 3+ messages in thread
From: Joe Perches @ 2013-08-29 23:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, linux-mm

kcalloc returns zeroed memory.
There's no need to use this flag.

Signed-off-by: Joe Perches <joe@perches.com>
---
 mm/ksm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/ksm.c b/mm/ksm.c
index 0bea2b2..175fff7 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -2309,8 +2309,8 @@ static ssize_t merge_across_nodes_store(struct kobject *kobj,
 			 * Allocate stable and unstable together:
 			 * MAXSMP NODES_SHIFT 10 will use 16kB.
 			 */
-			buf = kcalloc(nr_node_ids + nr_node_ids,
-				sizeof(*buf), GFP_KERNEL | __GFP_ZERO);
+			buf = kcalloc(nr_node_ids + nr_node_ids, sizeof(*buf),
+				      GFP_KERNEL);
 			/* Let us assume that RB_ROOT is NULL is zero */
 			if (!buf)
 				err = -ENOMEM;
-- 
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] 3+ messages in thread

* Re: [PATCH] ksm: Remove redundant __GFP_ZERO from kcalloc
  2013-08-29 23:32 [PATCH] ksm: Remove redundant __GFP_ZERO from kcalloc Joe Perches
  2013-09-05  5:50 ` Wanpeng Li
@ 2013-09-05  5:50 ` Wanpeng Li
  1 sibling, 0 replies; 3+ messages in thread
From: Wanpeng Li @ 2013-09-05  5:50 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Andrew Morton, linux-mm

On Thu, Aug 29, 2013 at 04:32:14PM -0700, Joe Perches wrote:
>kcalloc returns zeroed memory.
>There's no need to use this flag.
>

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

>Signed-off-by: Joe Perches <joe@perches.com>
>---
> mm/ksm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/mm/ksm.c b/mm/ksm.c
>index 0bea2b2..175fff7 100644
>--- a/mm/ksm.c
>+++ b/mm/ksm.c
>@@ -2309,8 +2309,8 @@ static ssize_t merge_across_nodes_store(struct kobject *kobj,
> 			 * Allocate stable and unstable together:
> 			 * MAXSMP NODES_SHIFT 10 will use 16kB.
> 			 */
>-			buf = kcalloc(nr_node_ids + nr_node_ids,
>-				sizeof(*buf), GFP_KERNEL | __GFP_ZERO);
>+			buf = kcalloc(nr_node_ids + nr_node_ids, sizeof(*buf),
>+				      GFP_KERNEL);
> 			/* Let us assume that RB_ROOT is NULL is zero */
> 			if (!buf)
> 				err = -ENOMEM;
>-- 
>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] 3+ messages in thread

* Re: [PATCH] ksm: Remove redundant __GFP_ZERO from kcalloc
  2013-08-29 23:32 [PATCH] ksm: Remove redundant __GFP_ZERO from kcalloc Joe Perches
@ 2013-09-05  5:50 ` Wanpeng Li
  2013-09-05  5:50 ` Wanpeng Li
  1 sibling, 0 replies; 3+ messages in thread
From: Wanpeng Li @ 2013-09-05  5:50 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Andrew Morton, linux-mm

On Thu, Aug 29, 2013 at 04:32:14PM -0700, Joe Perches wrote:
>kcalloc returns zeroed memory.
>There's no need to use this flag.
>

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

>Signed-off-by: Joe Perches <joe@perches.com>
>---
> mm/ksm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/mm/ksm.c b/mm/ksm.c
>index 0bea2b2..175fff7 100644
>--- a/mm/ksm.c
>+++ b/mm/ksm.c
>@@ -2309,8 +2309,8 @@ static ssize_t merge_across_nodes_store(struct kobject *kobj,
> 			 * Allocate stable and unstable together:
> 			 * MAXSMP NODES_SHIFT 10 will use 16kB.
> 			 */
>-			buf = kcalloc(nr_node_ids + nr_node_ids,
>-				sizeof(*buf), GFP_KERNEL | __GFP_ZERO);
>+			buf = kcalloc(nr_node_ids + nr_node_ids, sizeof(*buf),
>+				      GFP_KERNEL);
> 			/* Let us assume that RB_ROOT is NULL is zero */
> 			if (!buf)
> 				err = -ENOMEM;
>-- 
>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] 3+ messages in thread

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 23:32 [PATCH] ksm: Remove redundant __GFP_ZERO from kcalloc Joe Perches
2013-09-05  5:50 ` Wanpeng Li
2013-09-05  5:50 ` Wanpeng Li

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