[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/APIC: include full string with error_interrupt() error messages



commit 013670adf50f49469eaf0ef251726959e956f470
Author:     Elliott Mitchell <ehem+xen@xxxxxxx>
AuthorDate: Thu Jul 13 16:58:24 2023 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jul 13 16:58:24 2023 +0200

    x86/APIC: include full string with error_interrupt() error messages
    
    Rather than adding ", " with each printf(), simply include them in the
    string initially.  This allows converting to strlcat() or other methods
    which strictly concatenate, rather than formatting.
    
    Signed-off-by: Elliott Mitchell <ehem+xen@xxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/apic.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index f71474d47d..8cfb8cd71c 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -1401,14 +1401,14 @@ static void cf_check spurious_interrupt(struct 
cpu_user_regs *regs)
 static void cf_check error_interrupt(struct cpu_user_regs *regs)
 {
     static const char *const esr_fields[] = {
-        "Send CS error",
-        "Receive CS error",
-        "Send accept error",
-        "Receive accept error",
-        "Redirectable IPI",
-        "Send illegal vector",
-        "Received illegal vector",
-        "Illegal register address",
+        ", Send CS error",
+        ", Receive CS error",
+        ", Send accept error",
+        ", Receive accept error",
+        ", Redirectable IPI",
+        ", Send illegal vector",
+        ", Received illegal vector",
+        ", Illegal register address",
     };
     unsigned int v, v1;
     int i;
@@ -1423,7 +1423,7 @@ static void cf_check error_interrupt(struct cpu_user_regs 
*regs)
             smp_processor_id(), v , v1);
     for ( i = 7; i >= 0; --i )
         if ( v1 & (1 << i) )
-            printk(", %s", esr_fields[i]);
+            printk("%s", esr_fields[i]);
     printk("\n");
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.