Skip to content

Commit 0bb4a8b

Browse files
committed
x86/boot/e820: Simplify e820__print_table() a bit
Introduce 'entry' for the current table entry and shorten repetitious use of e820_table->entries[i]. Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: H . Peter Anvin <hpa@zytor.com> Cc: Andy Shevchenko <andy@kernel.org> Cc: Arnd Bergmann <arnd@kernel.org> Cc: David Woodhouse <dwmw@amazon.co.uk> Cc: Juergen Gross <jgross@suse.com> Cc: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Rapoport <rppt@kernel.org> Cc: Paul Menzel <pmenzel@molgen.mpg.de> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://patch.msgid.link/20250515120549.2820541-3-mingo@kernel.org
1 parent db0d69c commit 0bb4a8b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

arch/x86/kernel/e820.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,14 @@ void __init e820__print_table(char *who)
205205
int i;
206206

207207
for (i = 0; i < e820_table->nr_entries; i++) {
208+
struct e820_entry *entry = e820_table->entries + i;
209+
208210
pr_info("%s: [mem %#018Lx-%#018Lx] ",
209211
who,
210-
e820_table->entries[i].addr,
211-
e820_table->entries[i].addr + e820_table->entries[i].size - 1);
212+
entry->addr,
213+
entry->addr + entry->size-1);
212214

213-
e820_print_type(e820_table->entries[i].type);
215+
e820_print_type(entry->type);
214216
pr_cont("\n");
215217
}
216218
}

0 commit comments

Comments
 (0)