All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/x86/kernel/tlb_uv.c: replace kmalloc/memset 0
@ 2010-10-24 12:19 Serafeim Zanikolas
  0 siblings, 0 replies; only message in thread
From: Serafeim Zanikolas @ 2010-10-24 12:19 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86, cpw, linux-kernel; +Cc: Serafeim Zanikolas

Replace kmalloc followed by memset 0 with kzalloc, and drop the unnecessary
cast.

Signed-off-by: Serafeim Zanikolas <sez@debian.org>
---
 arch/x86/kernel/tlb_uv.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index 20ea20a..f5b0258 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -1520,9 +1520,7 @@ static void __init uv_init_per_cpu(int nuvhubs)
 
 	timeout_us = calculate_destination_timeout();
 
-	uvhub_descs = (struct uvhub_desc *)
-		kmalloc(nuvhubs * sizeof(struct uvhub_desc), GFP_KERNEL);
-	memset(uvhub_descs, 0, nuvhubs * sizeof(struct uvhub_desc));
+	uvhub_descs = kzalloc(nuvhubs * sizeof(struct uvhub_desc), GFP_KERNEL);
 	uvhub_mask = kzalloc((nuvhubs+7)/8, GFP_KERNEL);
 	for_each_present_cpu(cpu) {
 		bcp = &per_cpu(bau_control, cpu);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-24 12:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-24 12:19 [PATCH] arch/x86/kernel/tlb_uv.c: replace kmalloc/memset 0 Serafeim Zanikolas

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.