Skip to content

Commit 6c08d76

Browse files
committed
x86/boot/e820: Use <linux/sizes.h> symbols for literals
Use the human-readable SZ_* constants. Suggested-by: Nikolay Borisov <nik.borisov@suse.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://patch.msgid.link/92a15c2d-055c-4f4e-b232-32030a8e5e54@suse.com
1 parent 0d9daff commit 6c08d76

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/x86/kernel/e820.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ __init static void e820__update_table_kexec(void)
617617
e820__update_table(e820_table_kexec);
618618
}
619619

620-
#define MAX_GAP_END 0x100000000ull
620+
#define MAX_GAP_END SZ_4G
621621

622622
/*
623623
* Search for a gap in the E820 memory space from 0 to MAX_GAP_END (4GB).
@@ -696,7 +696,7 @@ __init void e820__setup_pci_gap(void)
696696
pr_err("Cannot find an available gap in the 32-bit address range\n");
697697
pr_err("PCI devices with unassigned 32-bit BARs may not work!\n");
698698
#else
699-
max_gap_start = 0x10000000;
699+
max_gap_start = SZ_256M;
700700
#endif
701701
}
702702

@@ -1080,7 +1080,7 @@ __initdata static struct resource *e820_res;
10801080
__init static bool e820_device_region(enum e820_type type, struct resource *res)
10811081
{
10821082
/* This is the legacy BIOS/DOS ROM-shadow + MMIO region: */
1083-
if (res->start < (1ULL<<20))
1083+
if (res->start < SZ_1M)
10841084
return false;
10851085

10861086
/*

0 commit comments

Comments
 (0)