arch/x86/kernel/tlb_uv.c: replace kmalloc/memset 0
PATCH 1/1 arch/x86/kernel/tlb_uv.c: replace kmalloc/memset 0
Replace kmalloc followed by memset 0 with kzalloc, and drop the unnecessary cast.
Signed-off-by Serafeim Zanikolas <[email protected]>
--- arch/x86/kernel/tlb_uv.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
arch/x86/kernel/tlb_uv.c +1 -3
@@ -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);
Signature · 1 line
1.7.1