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

[Xen-changelog] [xen master] x86: drop pointless uses of __func__ / __FUNCTION__



commit ca0c9ed26cff8acd3063bfa60017c71517487658
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Sep 1 15:21:06 2016 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Sep 1 15:22:48 2016 +0200

    x86: drop pointless uses of __func__ / __FUNCTION__
    
    Non-debugging message text should be (and is in the cases here)
    distinguishable without also logging function names. Debugging message
    text, otoh, already includes file name and line number, so also
    logging function names is redundant. One relatively pointless debugging
    message gets removed altogether. In another case a missing log level
    specifier gets added at once.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/io_apic.c | 19 ++++++++-----------
 xen/arch/x86/irq.c     | 10 ++++------
 xen/arch/x86/msi.c     |  3 ---
 xen/arch/x86/time.c    |  3 +--
 xen/arch/x86/xstate.c  |  4 ++--
 5 files changed, 15 insertions(+), 24 deletions(-)

diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 8b2f03a..33e5927 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -2307,14 +2307,11 @@ int ioapic_guest_read(unsigned long physbase, unsigned 
int reg, u32 *pval)
     return 0;
 }
 
-#define WARN_BOGUS_WRITE(f, a...)                       \
-    dprintk(XENLOG_INFO, "\n"                           \
-            XENLOG_INFO "%s: apic=%d, pin=%d, irq=%d\n" \
-            XENLOG_INFO "%s: new_entry=%08x\n"          \
-            XENLOG_INFO "%s: " f "\n",                  \
-            __func__, apic, pin, irq,                   \
-            __func__, *(u32 *)&rte,                     \
-            __func__, ##a )
+#define WARN_BOGUS_WRITE(f, a...)                             \
+    dprintk(XENLOG_INFO, "IO-APIC: apic=%d, pin=%d, irq=%d\n" \
+            XENLOG_INFO "IO-APIC: new_entry=%08x\n"           \
+            XENLOG_INFO "IO-APIC: " f "\n",                   \
+            apic, pin, irq, *(u32 *)&rte, ##a )
 
 int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val)
 {
@@ -2385,9 +2382,9 @@ int ioapic_guest_write(unsigned long physbase, unsigned 
int reg, u32 val)
         spin_unlock_irqrestore(&ioapic_lock, flags);
         rte.vector = desc->arch.vector;
         if ( *(u32*)&rte != ret )
-            WARN_BOGUS_WRITE("old_entry=%08x pirq=%d\n%s: "
-                             "Attempt to modify IO-APIC pin for in-use IRQ!",
-                             ret, pirq, __FUNCTION__);
+            WARN_BOGUS_WRITE("old_entry=%08x pirq=%d\n" XENLOG_INFO
+                             "IO-APIC: Attempt to modify IO-APIC pin for 
in-use IRQ!",
+                             ret, pirq);
         return 0;
     }
 
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 3f93c31..8c1545a 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -404,10 +404,8 @@ static vmask_t *irq_get_used_vector_mask(int irq)
         ret = &global_used_vector_map;
 
         if ( desc->arch.used_vectors )
-        {
-            printk(XENLOG_INFO "%s: Strange, unassigned irq %d already has 
used_vectors!\n",
-                   __func__, irq);
-        }
+            printk(XENLOG_INFO "Unassigned IRQ %d already has used_vectors\n",
+                   irq);
         else
         {
             int vector;
@@ -415,8 +413,8 @@ static vmask_t *irq_get_used_vector_mask(int irq)
             vector = irq_to_vector(irq);
             if ( vector > 0 )
             {
-                printk(XENLOG_INFO "%s: Strange, irq %d already assigned 
vector %d!\n",
-                       __func__, irq, vector);
+                printk(XENLOG_INFO "IRQ %d already assigned vector %d\n",
+                       irq, vector);
                 
                 ASSERT(!test_bit(vector, ret));
 
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 8d789e4..649607a 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -164,10 +164,7 @@ void msi_compose_msg(unsigned vector, const cpumask_t 
*cpu_mask, struct msi_msg
 
     memset(msg, 0, sizeof(*msg));
     if ( !cpumask_intersects(cpu_mask, &cpu_online_map) )
-    {
-        dprintk(XENLOG_ERR,"%s, compose msi message error!!\n", __func__);
         return;
-    }
 
     if ( vector )
     {
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index b316f23..73e0f98 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1467,8 +1467,7 @@ static int __init verify_tsc_reliability(void)
         tsc_check_reliability();
         if ( tsc_max_warp )
         {
-            printk("%s: TSC warp detected, disabling TSC_RELIABLE\n",
-                   __func__);
+            printk("TSC warp detected, disabling TSC_RELIABLE\n");
             setup_clear_cpu_cap(X86_FEATURE_TSC_RELIABLE);
         }
     }
diff --git a/xen/arch/x86/xstate.c b/xen/arch/x86/xstate.c
index d90e89e..6e4a0d3 100644
--- a/xen/arch/x86/xstate.c
+++ b/xen/arch/x86/xstate.c
@@ -574,8 +574,8 @@ void xstate_init(struct cpuinfo_x86 *c)
          * We know FP/SSE and YMM about eax, and nothing about edx at present.
          */
         xsave_cntxt_size = _xstate_ctxt_size(feature_mask);
-        printk("%s: using cntxt_size: %#x and states: %#"PRIx64"\n",
-            __func__, xsave_cntxt_size, xfeature_mask);
+        printk("xstate: size: %#x and states: %#"PRIx64"\n",
+               xsave_cntxt_size, xfeature_mask);
 
         asm ( "fxsave %0" : "=m" (ctxt) );
         if ( ctxt.mxcsr_mask )
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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