]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/boot/e820: Make the field separator space character part of e820_print_type()
authorIngo Molnar <mingo@kernel.org>
Thu, 15 May 2025 12:05:22 +0000 (14:05 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 14 Dec 2025 08:19:37 +0000 (09:19 +0100)
We are going to add more columns to the E820 table printout,
so make e820_print_type()'s field separator (space character)
part of the function itself.

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-7-mingo@kernel.org
arch/x86/kernel/e820.c

index 460645d09c6cf58bdc013fc508edf4431f7d3d62..58001536ba7cadb2358912a3f1ff816d224d14a5 100644 (file)
@@ -188,15 +188,15 @@ void __init e820__range_add(u64 start, u64 size, enum e820_type type)
 static void __init e820_print_type(enum e820_type type)
 {
        switch (type) {
-       case E820_TYPE_RAM:             pr_cont("usable");                      break;
-       case E820_TYPE_RESERVED:        pr_cont("reserved");                    break;
-       case E820_TYPE_SOFT_RESERVED:   pr_cont("soft reserved");               break;
-       case E820_TYPE_ACPI:            pr_cont("ACPI data");                   break;
-       case E820_TYPE_NVS:             pr_cont("ACPI NVS");                    break;
-       case E820_TYPE_UNUSABLE:        pr_cont("unusable");                    break;
+       case E820_TYPE_RAM:             pr_cont(" usable");                     break;
+       case E820_TYPE_RESERVED:        pr_cont(" reserved");                   break;
+       case E820_TYPE_SOFT_RESERVED:   pr_cont(" soft reserved");              break;
+       case E820_TYPE_ACPI:            pr_cont(" ACPI data");                  break;
+       case E820_TYPE_NVS:             pr_cont(" ACPI NVS");                   break;
+       case E820_TYPE_UNUSABLE:        pr_cont(" unusable");                   break;
        case E820_TYPE_PMEM:            /* Fall through: */
-       case E820_TYPE_PRAM:            pr_cont("persistent (type %u)", type);  break;
-       default:                        pr_cont("type %u", type);               break;
+       case E820_TYPE_PRAM:            pr_cont(" persistent (type %u)", type); break;
+       default:                        pr_cont(" type %u", type);              break;
        }
 }
 
@@ -492,9 +492,9 @@ __e820__range_update(struct e820_table *table, u64 start, u64 size, enum e820_ty
                size = ULLONG_MAX - start;
 
        end = start + size;
-       printk(KERN_DEBUG "e820: update [mem %#010Lx-%#010Lx] ", start, end - 1);
+       printk(KERN_DEBUG "e820: update [mem %#010Lx-%#010Lx]", start, end - 1);
        e820_print_type(old_type);
-       pr_cont(" ==> ");
+       pr_cont(" ==>");
        e820_print_type(new_type);
        pr_cont("\n");
 
@@ -569,7 +569,7 @@ u64 __init e820__range_remove(u64 start, u64 size, enum e820_type old_type, bool
                size = ULLONG_MAX - start;
 
        end = start + size;
-       printk(KERN_DEBUG "e820: remove [mem %#010Lx-%#010Lx] ", start, end - 1);
+       printk(KERN_DEBUG "e820: remove [mem %#010Lx-%#010Lx]", start, end - 1);
        if (check_type)
                e820_print_type(old_type);
        pr_cont("\n");