提交 7bfb7e6b 编写于 作者: J Joe Perches 提交者: Ingo Molnar

perf: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node()

Use the convenience function instead of __GFP_ZERO.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/f58599ae1a8d7b32d37e9cf283e95fba6452f7f6.1377809875.git.joe@perches.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 274481de
...@@ -347,8 +347,7 @@ static struct amd_nb *amd_alloc_nb(int cpu) ...@@ -347,8 +347,7 @@ static struct amd_nb *amd_alloc_nb(int cpu)
struct amd_nb *nb; struct amd_nb *nb;
int i; int i;
nb = kmalloc_node(sizeof(struct amd_nb), GFP_KERNEL | __GFP_ZERO, nb = kzalloc_node(sizeof(struct amd_nb), GFP_KERNEL, cpu_to_node(cpu));
cpu_to_node(cpu));
if (!nb) if (!nb)
return NULL; return NULL;
......
...@@ -224,7 +224,7 @@ static int alloc_pebs_buffer(int cpu) ...@@ -224,7 +224,7 @@ static int alloc_pebs_buffer(int cpu)
if (!x86_pmu.pebs) if (!x86_pmu.pebs)
return 0; return 0;
buffer = kmalloc_node(PEBS_BUFFER_SIZE, GFP_KERNEL | __GFP_ZERO, node); buffer = kzalloc_node(PEBS_BUFFER_SIZE, GFP_KERNEL, node);
if (unlikely(!buffer)) if (unlikely(!buffer))
return -ENOMEM; return -ENOMEM;
...@@ -262,7 +262,7 @@ static int alloc_bts_buffer(int cpu) ...@@ -262,7 +262,7 @@ static int alloc_bts_buffer(int cpu)
if (!x86_pmu.bts) if (!x86_pmu.bts)
return 0; return 0;
buffer = kmalloc_node(BTS_BUFFER_SIZE, GFP_KERNEL | __GFP_ZERO, node); buffer = kzalloc_node(BTS_BUFFER_SIZE, GFP_KERNEL, node);
if (unlikely(!buffer)) if (unlikely(!buffer))
return -ENOMEM; return -ENOMEM;
...@@ -295,7 +295,7 @@ static int alloc_ds_buffer(int cpu) ...@@ -295,7 +295,7 @@ static int alloc_ds_buffer(int cpu)
int node = cpu_to_node(cpu); int node = cpu_to_node(cpu);
struct debug_store *ds; struct debug_store *ds;
ds = kmalloc_node(sizeof(*ds), GFP_KERNEL | __GFP_ZERO, node); ds = kzalloc_node(sizeof(*ds), GFP_KERNEL, node);
if (unlikely(!ds)) if (unlikely(!ds))
return -ENOMEM; return -ENOMEM;
......
...@@ -2713,7 +2713,7 @@ struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type, int cp ...@@ -2713,7 +2713,7 @@ struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type, int cp
size = sizeof(*box) + type->num_shared_regs * sizeof(struct intel_uncore_extra_reg); size = sizeof(*box) + type->num_shared_regs * sizeof(struct intel_uncore_extra_reg);
box = kmalloc_node(size, GFP_KERNEL | __GFP_ZERO, cpu_to_node(cpu)); box = kzalloc_node(size, GFP_KERNEL, cpu_to_node(cpu));
if (!box) if (!box)
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册