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

[Xen-devel] [PATCH] XSM: drop pointless uses of __FUNCTION__



Non-debugging message text should be (and is in the cases here)
distinguishable without also logging function names.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -241,8 +241,8 @@ static int flask_evtchn_interdomain(stru
     rc = security_transition_sid(sid1, sid2, SECCLASS_EVENT, &newsid);
     if ( rc )
     {
-        printk("%s: security_transition_sid failed, rc=%d (domain=%d)\n",
-               __FUNCTION__, -rc, d2->domain_id);
+        printk("security_transition_sid failed, rc=%d, Dom%d\n",
+               -rc, d2->domain_id);
         return rc;
     }
 
--- a/xen/xsm/flask/ss/services.c
+++ b/xen/xsm/flask/ss/services.c
@@ -1995,7 +1995,7 @@ int security_ocontext_add( u32 ocon, uns
             {
                 if ( c->sid == sid )
                     break;
-                printk("%s: Duplicate pirq %d\n", __FUNCTION__, add->u.pirq);
+                printk("flask: Duplicate pirq %d\n", add->u.pirq);
                 ret = -EEXIST;
                 break;
             }
@@ -2027,9 +2027,8 @@ int security_ocontext_add( u32 ocon, uns
                 c->u.ioport.high_ioport == high && c->sid == sid)
                 break;
 
-            printk("%s: IO Port overlap with entry %#x - %#x\n",
-                   __FUNCTION__, c->u.ioport.low_ioport,
-                   c->u.ioport.high_ioport);
+            printk("flask: IO Port overlap with entry %#x - %#x\n",
+                   c->u.ioport.low_ioport, c->u.ioport.high_ioport);
             ret = -EEXIST;
             break;
         }
@@ -2061,8 +2060,8 @@ int security_ocontext_add( u32 ocon, uns
                 c->u.iomem.high_iomem == high && c->sid == sid)
                 break;
 
-            printk("%s: IO Memory overlap with entry %#"PRIx64" - 
%#"PRIx64"\n",
-                   __FUNCTION__, c->u.iomem.low_iomem, c->u.iomem.high_iomem);
+            printk("flask: IO Memory overlap with entry %#"PRIx64" - 
%#"PRIx64"\n",
+                   c->u.iomem.low_iomem, c->u.iomem.high_iomem);
             ret = -EEXIST;
             break;
         }
@@ -2092,8 +2091,7 @@ int security_ocontext_add( u32 ocon, uns
                 if ( c->sid == sid )
                     break;
 
-                printk("%s: Duplicate PCI Device %#x\n", __FUNCTION__,
-                        add->u.device);
+                printk("flask: Duplicate PCI Device %#x\n", add->u.device);
                 ret = -EEXIST;
                 break;
             }
@@ -2146,7 +2144,7 @@ int security_ocontext_del( u32 ocon, uns
             }
         }
 
-        printk("%s: ocontext not found: pirq %ld\n", __FUNCTION__, low);
+        printk("flask: ocontext not found: pirq %ld\n", low);
         ret = -ENOENT;
         break;
 
@@ -2172,8 +2170,7 @@ int security_ocontext_del( u32 ocon, uns
             }
         }
 
-        printk("%s: ocontext not found: ioport %#lx - %#lx\n",
-                __FUNCTION__, low, high);
+        printk("flask: ocontext not found: ioport %#lx - %#lx\n", low, high);
         ret = -ENOENT;
         break;
 
@@ -2199,8 +2196,7 @@ int security_ocontext_del( u32 ocon, uns
             }
         }
 
-        printk("%s: ocontext not found: iomem %#lx - %#lx\n",
-                __FUNCTION__, low, high);
+        printk("flask: ocontext not found: iomem %#lx - %#lx\n", low, high);
         ret = -ENOENT;
         break;
 
@@ -2225,7 +2221,7 @@ int security_ocontext_del( u32 ocon, uns
             }
         }
 
-        printk("%s: ocontext not found: pcidevice %#lx\n", __FUNCTION__, low);
+        printk("flask: ocontext not found: pcidevice %#lx\n", low);
         ret = -ENOENT;
         break;
 
--- a/xen/xsm/xsm_core.c
+++ b/xen/xsm/xsm_core.c
@@ -48,8 +48,7 @@ static int __init xsm_core_init(const vo
 
     if ( verify(&dummy_xsm_ops) )
     {
-        printk("%s could not verify "
-               "dummy_xsm_ops structure.\n", __FUNCTION__);
+        printk(XENLOG_ERR "Could not verify dummy_xsm_ops structure\n");
         return -EIO;
     }
 
@@ -77,7 +76,7 @@ int __init xsm_multiboot_init(unsigned l
         if ( ret )
         {
             bootstrap_map(NULL);
-            printk("%s: Error initializing policy.\n", __FUNCTION__);
+            printk(XENLOG_ERR "Error %d initializing XSM policy\n", ret);
             return -EINVAL;
         }
     }
@@ -103,8 +102,7 @@ int __init xsm_dt_init(void)
         ret = xsm_dt_policy_init(&policy_buffer, &policy_size);
         if ( ret )
         {
-            printk("%s: Error initializing policy (rc = %d).\n",
-                   __FUNCTION__, ret);
+            printk(XENLOG_ERR "Error %d initializing XSM policy\n", ret);
             return -EINVAL;
         }
     }
@@ -144,8 +142,7 @@ int __init register_xsm(struct xsm_opera
 {
     if ( verify(ops) )
     {
-        printk("%s could not verify "
-               "security_operations structure.\n", __FUNCTION__);
+        printk(XENLOG_ERR "Could not verify xsm_operations structure\n");
         return -EINVAL;
     }
 


Attachment: XSM-drop-__FUNCTION__.patch
Description: Text document

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

 


Rackspace

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