Skip to content

Commit

Permalink
trivial copy_data_pages() tidy up
Browse files Browse the repository at this point in the history
Change the loop style of copy_data_pages() to remove a duplicate condition.

Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
  • Loading branch information
Fengguang Wu authored and Adrian Bunk committed Oct 20, 2007
1 parent 9631512 commit df7c487
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions kernel/power/snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(copy_bm);
do {
for(;;) {
pfn = memory_bm_next_pfn(orig_bm);
if (likely(pfn != BM_END_OF_MAP))
copy_data_page(memory_bm_next_pfn(copy_bm), pfn);
} while (pfn != BM_END_OF_MAP);
if (unlikely(pfn == BM_END_OF_MAP))
break;
copy_data_page(memory_bm_next_pfn(copy_bm), pfn);
}
}

/* Total number of image pages */
Expand Down

0 comments on commit df7c487

Please sign in to comment.