diff options
author | ZhangPeng <[email protected]> | 2023-07-27 09:16:12 +0800 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-08-21 13:37:29 -0700 |
commit | 108c3dc6cd3dbe36824469b7ea860337978e0439 (patch) | |
tree | 27253364177e99341a1a9b83e82723ab429ab2dd | |
parent | 4852a80524937db8215406cf2b2431b14f320000 (diff) |
mm: kmsan: use helper macros PAGE_ALIGN and PAGE_ALIGN_DOWN
Use helper macros PAGE_ALIGN and PAGE_ALIGN_DOWN to improve code
readability. No functional modification involved.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: ZhangPeng <[email protected]>
Reviewed-by: Alexander Potapenko <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Kefeng Wang <[email protected]>
Cc: Marco Elver <[email protected]>
Cc: Nanyong Sun <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | mm/kmsan/shadow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/kmsan/shadow.c b/mm/kmsan/shadow.c index 966994268a01..87318f9170f1 100644 --- a/mm/kmsan/shadow.c +++ b/mm/kmsan/shadow.c @@ -281,8 +281,8 @@ void __init kmsan_init_alloc_meta_for_range(void *start, void *end) struct page *page; u64 size; - start = (void *)ALIGN_DOWN((u64)start, PAGE_SIZE); - size = ALIGN((u64)end - (u64)start, PAGE_SIZE); + start = (void *)PAGE_ALIGN_DOWN((u64)start); + size = PAGE_ALIGN((u64)end - (u64)start); shadow = memblock_alloc(size, PAGE_SIZE); origin = memblock_alloc(size, PAGE_SIZE); for (u64 addr = 0; addr < size; addr += PAGE_SIZE) { |