[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250515120549.2820541-31-mingo@kernel.org>
Date: Thu, 15 May 2025 14:05:46 +0200
From: Ingo Molnar <mingo@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>,
Andy Shevchenko <andy@...nel.org>,
Arnd Bergmann <arnd@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Juergen Gross <jgross@...e.com>,
"H . Peter Anvin" <hpa@...or.com>,
Kees Cook <keescook@...omium.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mike Rapoport <rppt@...nel.org>,
Paul Menzel <pmenzel@...gen.mpg.de>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
David Woodhouse <dwmw@...zon.co.uk>
Subject: [PATCH 30/32] x86/boot/e820: Change e820_type_to_string() to take a 'type' parameter
Simplify the e820_type_to_string() interface by changing it
to take a 'enum e820_type type' parameter.
This is going to allow the unification of the e820_type_to_string()
and e820_print_type() functions.
No change in functionality intended.
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: Andy Shevchenko <andy@...nel.org>
Cc: Arnd Bergmann <arnd@...nel.org>
Cc: David Woodhouse <dwmw@...zon.co.uk>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Kees Cook <keescook@...omium.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mike Rapoport (Microsoft) <rppt@...nel.org>
---
arch/x86/kernel/e820.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 6c9c00ce8db9..fe3e078a4064 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -1065,9 +1065,9 @@ __init void e820__finish_early_params(void)
}
}
-__init static const char * e820_type_to_string(struct e820_entry *entry)
+__init static const char * e820_type_to_string(enum e820_type type)
{
- switch (entry->type) {
+ switch (type) {
case E820_TYPE_RAM: return "System RAM";
case E820_TYPE_ACPI: return "ACPI Tables";
case E820_TYPE_NVS: return "ACPI Non-volatile Storage";
@@ -1175,7 +1175,7 @@ __init void e820__reserve_resources(void)
}
res->start = entry->addr;
res->end = end;
- res->name = e820_type_to_string(entry);
+ res->name = e820_type_to_string(entry->type);
res->flags = e820_type_to_iomem_type(entry);
res->desc = e820_type_to_iores_desc(entry);
@@ -1195,7 +1195,7 @@ __init void e820__reserve_resources(void)
for (idx = 0; idx < e820_table_kexec->nr_entries; idx++) {
struct e820_entry *entry = e820_table_kexec->entries + idx;
- firmware_map_add_early(entry->addr, entry->addr + entry->size, e820_type_to_string(entry));
+ firmware_map_add_early(entry->addr, entry->addr + entry->size, e820_type_to_string(entry->type));
}
}
--
2.45.2
Powered by blists - more mailing lists