xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pass-through: drop pointless uses of __func__
@ 2016-08-24  7:51 Jan Beulich
  2016-08-24 20:28 ` Konrad Rzeszutek Wilk
  2016-08-31 18:36 ` Andrew Cooper
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Beulich @ 2016-08-24  7:51 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]

Non-debugging message text should be (and is in the cases here)
distinguishable without also logging function names. Additionally log
the PCI device coordinates for alloc_pdev() failure.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -379,8 +379,8 @@ static struct pci_dev *alloc_pdev(struct
             break;
 
         default:
-            printk(XENLOG_WARNING "%s: unknown type: %04x:%02x:%02x.%u\n",
-                   __func__, pseg->nr, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
+            printk(XENLOG_WARNING "%04x:%02x:%02x.%u: unknown type %d\n",
+                   pseg->nr, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pdev->type);
             break;
     }
 
@@ -991,7 +991,8 @@ static int __init _scan_pci_devices(stru
                 pdev = alloc_pdev(pseg, bus, PCI_DEVFN(dev, func));
                 if ( !pdev )
                 {
-                    printk("%s: alloc_pdev failed.\n", __func__);
+                    printk(XENLOG_WARNING "%04x:%02x:%02x.%u: alloc_pdev failed\n",
+                           pseg->nr, bus, dev, func);
                     return -ENOMEM;
                 }
 




[-- Attachment #2: pt-drop-__func__.patch --]
[-- Type: text/plain, Size: 1273 bytes --]

pass-through: drop pointless uses of __func__

Non-debugging message text should be (and is in the cases here)
distinguishable without also logging function names. Additionally log
the PCI device coordinates for alloc_pdev() failure.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -379,8 +379,8 @@ static struct pci_dev *alloc_pdev(struct
             break;
 
         default:
-            printk(XENLOG_WARNING "%s: unknown type: %04x:%02x:%02x.%u\n",
-                   __func__, pseg->nr, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
+            printk(XENLOG_WARNING "%04x:%02x:%02x.%u: unknown type %d\n",
+                   pseg->nr, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pdev->type);
             break;
     }
 
@@ -991,7 +991,8 @@ static int __init _scan_pci_devices(stru
                 pdev = alloc_pdev(pseg, bus, PCI_DEVFN(dev, func));
                 if ( !pdev )
                 {
-                    printk("%s: alloc_pdev failed.\n", __func__);
+                    printk(XENLOG_WARNING "%04x:%02x:%02x.%u: alloc_pdev failed\n",
+                           pseg->nr, bus, dev, func);
                     return -ENOMEM;
                 }
 

[-- Attachment #3: Type: text/plain, Size: 127 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-01  7:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24  7:51 [PATCH] pass-through: drop pointless uses of __func__ Jan Beulich
2016-08-24 20:28 ` Konrad Rzeszutek Wilk
2016-08-31 18:36 ` Andrew Cooper
2016-09-01  7:11   ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).