Skip to content
Commit 809ed78a authored by Wen Yang's avatar Wen Yang Committed by Rafael J. Wysocki
Browse files

PM: hibernate: improve arithmetic division in preallocate_highmem_fraction()



do_div() does a 64-by-32 division. Use div64_u64() instead of
do_div() if the divisor is u64, to avoid truncation to 32-bit.

This change also cleans up code a tad.

Signed-off-by: default avatarWen Yang <wenyang@linux.alibaba.com>
[ rjw: Subject ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e976eb4b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment