| From: Yuntao Wang <ytcoode@gmail.com> |
| Subject: x86/crash: use SZ_1M macro instead of hardcoded value |
| Date: Tue, 2 Jan 2024 22:49:04 +0800 |
| |
| Use SZ_1M macro instead of hardcoded 1<<20 to make code more readable. |
| |
| Link: https://lkml.kernel.org/r/20240102144905.110047-3-ytcoode@gmail.com |
| Signed-off-by: Yuntao Wang <ytcoode@gmail.com> |
| Acked-by: Baoquan He <bhe@redhat.com> |
| Cc: Borislav Petkov (AMD) <bp@alien8.de> |
| Cc: Dave Hansen <dave.hansen@linux.intel.com> |
| Cc: Dave Young <dyoung@redhat.com> |
| Cc: Hari Bathini <hbathini@linux.ibm.com> |
| Cc: "H. Peter Anvin" <hpa@zytor.com> |
| Cc: Ingo Molnar <mingo@redhat.com> |
| Cc: Sourabh Jain <sourabhjain@linux.ibm.com> |
| Cc: Takashi Iwai <tiwai@suse.de> |
| Cc: Thomas Gleixner <tglx@linutronix.de> |
| Cc: Vivek Goyal <vgoyal@redhat.com> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| arch/x86/kernel/crash.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/arch/x86/kernel/crash.c~x86-crash-use-sz_1m-macro-instead-of-hardcoded-value |
| +++ a/arch/x86/kernel/crash.c |
| @@ -170,7 +170,7 @@ static int elf_header_exclude_ranges(str |
| 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; |
| |
| _ |