diff mbox series

x86/boot: Use printk_once() instead of opencoding it

Message ID 20241218123845.58850-1-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series x86/boot: Use printk_once() instead of opencoding it | expand

Commit Message

Andrew Cooper Dec. 18, 2024, 12:38 p.m. UTC
Adjust the message for brevity.  No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/setup.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)


base-commit: 171cb318deaa0be786cc3af3599c72e8909e60f9

Comments

Jason Andryuk Dec. 18, 2024, 5:02 p.m. UTC | #1
On 2024-12-18 07:38, Andrew Cooper wrote:
> Adjust the message for brevity.  No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
diff mbox series

Patch

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 0a748e2c1412..decb566939dd 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1060,7 +1060,7 @@  void asmlinkage __init noreturn __start_xen(void)
     unsigned int initrdidx, num_parked = 0;
     struct boot_info *bi;
     unsigned long nr_pages, raw_max_page;
-    int i, j, e820_warn = 0, bytes = 0;
+    int i, j, bytes = 0;
     unsigned long eb_start, eb_end;
     bool acpi_boot_table_init_done = false, relocated = false;
     bool vm_init_done = false;
@@ -1297,12 +1297,8 @@  void asmlinkage __init noreturn __start_xen(void)
              */
             if ( (map->base_addr_high == 0) && (map->length_high != 0) )
             {
-                if ( !e820_warn )
-                {
-                    printk("WARNING: Buggy e820 map detected and fixed "
-                           "(truncated length fields).\n");
-                    e820_warn = 1;
-                }
+                printk_once(XENLOG_WARNING
+                            "WARNING: Buggy e820 map detected; truncated length\n");
                 map->length_high = 0;
             }