lkml.org 
[lkml]   [2023]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] x86/crash: use SZ_1M macro instead of hardcoded value
On 12/15/23 at 12:38am, Yuntao Wang wrote:
> Use SZ_1M macro instead of hardcoded 1<<20 to make code more readable.
>
> Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
> ---
> arch/x86/kernel/crash.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
> index 792231a56d11..249b5876e7ec 100644
> --- a/arch/x86/kernel/crash.c
> +++ b/arch/x86/kernel/crash.c

Acked-by: Baoquan He <bhe@redhat.com>

> @@ -170,7 +170,7 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem)
> int ret = 0;
>
> /* Exclude the low 1M because it is always reserved */
> - ret = crash_exclude_mem_range(cmem, 0, (1<<20)-1);
> + ret = crash_exclude_mem_range(cmem, 0, SZ_1M - 1);
> if (ret)
> return ret;
>
> --
> 2.43.0
>


\
 
 \ /
  Last update: 2023-12-15 04:29    [W:1.183 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site