The patch titled Subject: kexec: use ALIGN macro instead of open-coding it has been added to the -mm mm-nonmm-unstable branch. Its filename is kexec-use-align-macro-instead-of-open-coding-it.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/kexec-use-align-macro-instead-of-open-coding-it.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Yuntao Wang <ytcoode@xxxxxxxxx> Subject: kexec: use ALIGN macro instead of open-coding it Date: Tue, 12 Dec 2023 22:27:06 +0800 Use ALIGN macro instead of open-coding it to improve code readability. Link: https://lkml.kernel.org/r/20231212142706.25149-1-ytcoode@xxxxxxxxx Signed-off-by: Yuntao Wang <ytcoode@xxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/kexec_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/kernel/kexec_core.c~kexec-use-align-macro-instead-of-open-coding-it +++ a/kernel/kexec_core.c @@ -432,7 +432,7 @@ static struct page *kimage_alloc_crash_c pages = NULL; size = (1 << order) << PAGE_SHIFT; - hole_start = (image->control_page + (size - 1)) & ~(size - 1); + hole_start = ALIGN(image->control_page, size); hole_end = hole_start + size - 1; while (hole_end <= crashk_res.end) { unsigned long i; @@ -449,7 +449,7 @@ static struct page *kimage_alloc_crash_c mend = mstart + image->segment[i].memsz - 1; if ((hole_end >= mstart) && (hole_start <= mend)) { /* Advance the hole to the end of the segment */ - hole_start = (mend + (size - 1)) & ~(size - 1); + hole_start = ALIGN(mend, size); hole_end = hole_start + size - 1; break; } _ Patches currently in -mm which might be from ytcoode@xxxxxxxxx are crash_core-fix-the-check-for-whether-crashkernel-is-from-high-memory.patch kexec-use-align-macro-instead-of-open-coding-it.patch