diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 26b9168321e765f85d3d90190644c04e7f2b6ce7..8a6eaf7367f30fa7be43fe0a6c6935afb239ece5 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -1566,9 +1566,7 @@ static unsigned long preallocate_image_highmem(unsigned long nr_pages) */ static unsigned long __fraction(u64 x, u64 multiplier, u64 base) { - x *= multiplier; - do_div(x, base); - return (unsigned long)x; + return div64_u64(x * multiplier, base); } static unsigned long preallocate_highmem_fraction(unsigned long nr_pages,