Thread (4 messages) flat view 4 messages, 2 authors, 2017-12-04

Re: [PATCH v2 1/2] KVM: PPC: Book3S HV: Drop prepare_done from struct kvm_resize_hpt and cleanups

From: Joe Perches <joe@perches.com>
Date: 2017-12-04 15:02:11
Also in: kvm, lkml

On Mon, 2017-12-04 at 09:36 -0500, Serhii Popovych wrote:
Change comparison against zero to make checkpatch.pl happy.
Huh?  Either I'm confused or you are incorrect here.

checkpatch should or does not warn against comparisons
to zero.  There is a test for comparison to NULL.
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
[]
quoted hunk ↗ jump to hunk
@@ -1547,16 +1561,12 @@ long kvm_vm_ioctl_resize_hpt_commit(struct kvm *kvm,
 	if (!resize || (resize->order != shift))
 		goto out;
 
-	ret = -EBUSY;
-	if (!resize->prepare_done)
-		goto out;
-
 	ret = resize->error;
-	if (ret != 0)
+	if (ret)
 		goto out;
 
 	ret = resize_hpt_rehash(resize);
-	if (ret != 0)
+	if (ret)
 		goto out;
 
 	resize_hpt_pivot(resize);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help