KVM: PPC: Book3S HV: Fix typo in kvmppc_hv_get_dirty_log_radix()
authorPaul Mackerras <paulus@ozlabs.org>
Fri, 10 Nov 2017 05:43:35 +0000 (16:43 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 23 Nov 2017 03:23:08 +0000 (14:23 +1100)
This fixes a typo where the intent was to assign to 'j' in order to
skip some number of bits in the dirty bitmap for a guest.  The effect
of the typo is benign since it means we just iterate through all the
bits rather than skipping bits which we know will be zero.  This issue
was found by Coverity.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_64_mmu_radix.c

index 58618f6..0c85481 100644 (file)
@@ -573,7 +573,7 @@ long kvmppc_hv_get_dirty_log_radix(struct kvm *kvm,
                j = i + 1;
                if (npages) {
                        set_dirty_bits(map, i, npages);
-                       i = j + npages;
+                       j = i + npages;
                }
        }
        return 0;