KVM: MMU: Remove for_each_unsync_children() macro
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Tue, 29 Nov 2011 05:02:45 +0000 (14:02 +0900)
committerAvi Kivity <avi@redhat.com>
Mon, 5 Mar 2012 12:52:17 +0000 (14:52 +0200)
There is only one user of it and for_each_set_bit() does the same.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu.c

index 224b02c3cda91683afed63cccc5e794fadef4559..8a9b27cb4449007eaeb7c77b79ff1bb9a3268734 100644 (file)
@@ -1391,11 +1391,6 @@ struct kvm_mmu_pages {
        unsigned int nr;
 };
 
-#define for_each_unsync_children(bitmap, idx)          \
-       for (idx = find_first_bit(bitmap, 512);         \
-            idx < 512;                                 \
-            idx = find_next_bit(bitmap, 512, idx+1))
-
 static int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp,
                         int idx)
 {
@@ -1417,7 +1412,7 @@ static int __mmu_unsync_walk(struct kvm_mmu_page *sp,
 {
        int i, ret, nr_unsync_leaf = 0;
 
-       for_each_unsync_children(sp->unsync_child_bitmap, i) {
+       for_each_set_bit(i, sp->unsync_child_bitmap, 512) {
                struct kvm_mmu_page *child;
                u64 ent = sp->spt[i];