aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/phys_pager.c
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-04-21 19:57:40 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-04-21 19:57:40 +0000
commitd9c9c81c083a76a65c6cacf8fcbc0511e2ffa489 (patch)
treecd4dfa8859a5f57124d315ff395b524d7587e1ea /sys/vm/phys_pager.c
parent5977d3e898348ce714243a4189cee906151aa522 (diff)
downloadsrc-d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489.tar.gz
src-d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489.zip
sys: use our roundup2/rounddown2() macros when param.h is available.
rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted.
Notes
Notes: svn path=/head/; revision=298433
Diffstat (limited to 'sys/vm/phys_pager.c')
-rw-r--r--sys/vm/phys_pager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c
index 02e819e6a5c7..59d22dd886a7 100644
--- a/sys/vm/phys_pager.c
+++ b/sys/vm/phys_pager.c
@@ -187,7 +187,7 @@ phys_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before,
{
vm_pindex_t base, end;
- base = pindex & (~(PHYSCLUSTER - 1));
+ base = rounddown2(pindex, PHYSCLUSTER);
end = base + (PHYSCLUSTER - 1);
if (before != NULL)
*before = pindex - base;