aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-04-23 20:59:04 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-04-23 20:59:04 +0300
commit38c7c94bcd131290dcbae110dfb33b0b78c99d90 (patch)
tree7ca41e8cbd221b3f3421bfdd4f184f539a8ba8d0 /common
parent42451ed4718af3f93770feb201bd023625d69b3a (diff)
downloadkmi-38c7c94bcd131290dcbae110dfb33b0b78c99d90.tar.gz
kmi-38c7c94bcd131290dcbae110dfb33b0b78c99d90.zip
change alignment functions to be type generic
Diffstat (limited to 'common')
-rw-r--r--common/mem_regions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/mem_regions.c b/common/mem_regions.c
index e5de0e3..e994b0e 100644
--- a/common/mem_regions.c
+++ b/common/mem_regions.c
@@ -393,7 +393,7 @@ static void __try_coalesce_regions(struct mem_region_root *r,
stat_t free_region(struct mem_region_root *r, vm_t start)
{
/* addr not aligned to page boundary, corrupted or incorrect pointer */
- if (!aligned(start, BASE_PAGE_SIZE))
+ if (!is_aligned(start, BASE_PAGE_SIZE))
return ERR_ALIGN;
struct mem_region *m = find_used_region(r, __page(start));
@@ -431,7 +431,7 @@ vm_t map_fill_region(struct vm_branch *b, region_callback_t *mem_handler,
/* NULL does pass this check, so technically all NULL pages are
* aligned, but they're caught in the while expr so this should
* work even if someone tries to map NULL */
- if (!aligned(runner, o_pages))
+ if (!is_aligned(runner, o_pages))
continue;
while (pages >= o_pages) {