From: Joe Perches Date: Tue, 12 Nov 2013 23:07:10 +0000 (-0800) Subject: ksm: remove redundant __GFP_ZERO from kcalloc X-Git-Tag: v3.13-rc1~106^2~245 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=bafe1e14403ad40714ffcfa1fb173b371cc87a1f;p=~andy%2Flinux ksm: remove redundant __GFP_ZERO from kcalloc kcalloc returns zeroed memory. There's no need to use this flag. Signed-off-by: Joe Perches Reviewed-by: Wanpeng Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/ksm.c b/mm/ksm.c index 0bea2b262a4..175fff79dc9 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;