Skip to contentSkip to conversation

KVM: PPC: Book3S: Replace kmalloc_node+memset with kzalloc_node

PATCH Applied wangbo 2 participants 2 messages Jan 7, 2019 – Feb 22, 2019

Subsystems (2)
lore
Share & tools
lore

wangbo

author
#0 lore raw

PATCH 1/1 KVM: PPC: Book3S: Replace kmalloc_node+memset with kzalloc_node

Replace kmalloc_node and memset with kzalloc_node

---
 arch/powerpc/kvm/book3s_hv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/kvm/book3s_hv.c +1 -2
index 5a066fc..27112b7 100644
@@ -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;
Signature · 1 line
2.7.4