From 729533413f4e97bb65852c22fb914805e2759b5a Mon Sep 17 00:00:00 2001 From: pfg Date: Thu, 21 Apr 2016 19:57:40 +0000 Subject: 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. --- sys/x86/iommu/intel_gas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/x86/iommu') diff --git a/sys/x86/iommu/intel_gas.c b/sys/x86/iommu/intel_gas.c index 8b18b4c..ffc8b70 100644 --- a/sys/x86/iommu/intel_gas.c +++ b/sys/x86/iommu/intel_gas.c @@ -327,8 +327,8 @@ dmar_gas_match_one(struct dmar_gas_match_args *a, struct dmar_map_entry *prev, * the boundary. Check if there is enough space after the * next boundary after the prev->end. */ - bs = (a->entry->start + a->offset + a->common->boundary) & - ~(a->common->boundary - 1); + bs = rounddown2(a->entry->start + a->offset + a->common->boundary, + a->common->boundary); start = roundup2(bs, a->common->alignment); /* DMAR_PAGE_SIZE to create gap after new entry. */ if (start + a->offset + a->size + DMAR_PAGE_SIZE <= -- cgit v1.1