Skip to content

Commit

Permalink
KVM: PPC: Book3S HV: Replace kmalloc_node+memset with kzalloc_node
Browse files Browse the repository at this point in the history
Replace kmalloc_node and memset with kzalloc_node

Signed-off-by: wangbo <wang.bo116@zte.com.cn>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
  • Loading branch information
wangbo authored and Paul Mackerras committed Feb 19, 2019
1 parent 41a8645 commit 08434ab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/powerpc/kvm/book3s_hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -5342,13 +5342,11 @@ static int kvm_init_subcore_bitmap(void)
continue;

sibling_subcore_state =
kmalloc_node(sizeof(struct sibling_subcore_state),
kzalloc_node(sizeof(struct sibling_subcore_state),
GFP_KERNEL, node);
if (!sibling_subcore_state)
return -ENOMEM;

memset(sibling_subcore_state, 0,
sizeof(struct sibling_subcore_state));

for (j = 0; j < threads_per_core; j++) {
int cpu = first_cpu + j;
Expand Down

0 comments on commit 08434ab

Please sign in to comment.