aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-08-29 16:59:17 -0400
committerIngo Molnar <mingo@kernel.org>2013-09-02 02:42:49 -0400
commit7bfb7e6bdd906f11ee9e751b3fec4f4fc728e818 (patch)
tree01eb8197d9e7b08b710f48e22b4b7363a783931a /arch
parent274481de6cb69abdb49403ff32abb63c23743413 (diff)
perf: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node()
Use the convenience function instead of __GFP_ZERO. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/f58599ae1a8d7b32d37e9cf283e95fba6452f7f6.1377809875.git.joe@perches.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/perf_event_amd.c3
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_ds.c6
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_uncore.c2
3 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c
index 4cbe03287b08..beeb7cc07044 100644
--- a/arch/x86/kernel/cpu/perf_event_amd.c
+++ b/arch/x86/kernel/cpu/perf_event_amd.c
@@ -347,8 +347,7 @@ static struct amd_nb *amd_alloc_nb(int cpu)
347 struct amd_nb *nb; 347 struct amd_nb *nb;
348 int i; 348 int i;
349 349
350 nb = kmalloc_node(sizeof(struct amd_nb), GFP_KERNEL | __GFP_ZERO, 350 nb = kzalloc_node(sizeof(struct amd_nb), GFP_KERNEL, cpu_to_node(cpu));
351 cpu_to_node(cpu));
352 if (!nb) 351 if (!nb)
353 return NULL; 352 return NULL;
354 353
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c
index 442fcc23f3a8..63438aad177f 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_ds.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c
@@ -224,7 +224,7 @@ static int alloc_pebs_buffer(int cpu)
224 if (!x86_pmu.pebs) 224 if (!x86_pmu.pebs)
225 return 0; 225 return 0;
226 226
227 buffer = kmalloc_node(PEBS_BUFFER_SIZE, GFP_KERNEL | __GFP_ZERO, node); 227 buffer = kzalloc_node(PEBS_BUFFER_SIZE, GFP_KERNEL, node);
228 if (unlikely(!buffer)) 228 if (unlikely(!buffer))
229 return -ENOMEM; 229 return -ENOMEM;
230 230
@@ -262,7 +262,7 @@ static int alloc_bts_buffer(int cpu)
262 if (!x86_pmu.bts) 262 if (!x86_pmu.bts)
263 return 0; 263 return 0;
264 264
265 buffer = kmalloc_node(BTS_BUFFER_SIZE, GFP_KERNEL | __GFP_ZERO, node); 265 buffer = kzalloc_node(BTS_BUFFER_SIZE, GFP_KERNEL, node);
266 if (unlikely(!buffer)) 266 if (unlikely(!buffer))
267 return -ENOMEM; 267 return -ENOMEM;
268 268
@@ -295,7 +295,7 @@ static int alloc_ds_buffer(int cpu)
295 int node = cpu_to_node(cpu); 295 int node = cpu_to_node(cpu);
296 struct debug_store *ds; 296 struct debug_store *ds;
297 297
298 ds = kmalloc_node(sizeof(*ds), GFP_KERNEL | __GFP_ZERO, node); 298 ds = kzalloc_node(sizeof(*ds), GFP_KERNEL, node);
299 if (unlikely(!ds)) 299 if (unlikely(!ds))
300 return -ENOMEM; 300 return -ENOMEM;
301 301
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 34c11ae9bda3..fd8011ed4dcd 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -2713,7 +2713,7 @@ struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type, int cp
2713 2713
2714 size = sizeof(*box) + type->num_shared_regs * sizeof(struct intel_uncore_extra_reg); 2714 size = sizeof(*box) + type->num_shared_regs * sizeof(struct intel_uncore_extra_reg);
2715 2715
2716 box = kmalloc_node(size, GFP_KERNEL | __GFP_ZERO, cpu_to_node(cpu)); 2716 box = kzalloc_node(size, GFP_KERNEL, cpu_to_node(cpu));
2717 if (!box) 2717 if (!box)
2718 return NULL; 2718 return NULL;
2719 2719