Commit df7c4872 authored by Fengguang Wu's avatar Fengguang Wu Committed by Adrian Bunk

trivial copy_data_pages() tidy up

Change the loop style of copy_data_pages() to remove a duplicate condition.
Signed-off-by: default avatarFengguang Wu <wfg@mail.ustc.edu.cn>
Acked-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
parent 96315129
...@@ -1005,11 +1005,12 @@ copy_data_pages(struct memory_bitmap *copy_bm, struct memory_bitmap *orig_bm) ...@@ -1005,11 +1005,12 @@ copy_data_pages(struct memory_bitmap *copy_bm, struct memory_bitmap *orig_bm)
} }
memory_bm_position_reset(orig_bm); memory_bm_position_reset(orig_bm);
memory_bm_position_reset(copy_bm); memory_bm_position_reset(copy_bm);
do { for(;;) {
pfn = memory_bm_next_pfn(orig_bm); pfn = memory_bm_next_pfn(orig_bm);
if (likely(pfn != BM_END_OF_MAP)) if (unlikely(pfn == BM_END_OF_MAP))
copy_data_page(memory_bm_next_pfn(copy_bm), pfn); break;
} while (pfn != BM_END_OF_MAP); copy_data_page(memory_bm_next_pfn(copy_bm), pfn);
}
} }
/* Total number of image pages */ /* Total number of image pages */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment