diff options
author | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2020-05-29 04:24:52 +0200 |
---|---|---|
committer | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2020-05-29 17:44:59 +0200 |
commit | 4969a3a2cd3c2dbb1bcdc6a3a516de9ff972372e (patch) | |
tree | d75d5760a0fd99e95d6afcb60f7d9585c92d47ad /drivers/xen/xen-pciback/pciback_ops.c | |
parent | xenbus: Use dev_printk() when possible (diff) | |
download | linux-4969a3a2cd3c2dbb1bcdc6a3a516de9ff972372e.tar.xz linux-4969a3a2cd3c2dbb1bcdc6a3a516de9ff972372e.zip |
xen/pci: Get rid of verbose_request and use dev_dbg() instead
Information printed under verbose_request is clearly used for debugging
only. Remove it and use dev_dbg() instead.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/1590719092-8578-1-git-send-email-boris.ostrovsky@oracle.com
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'drivers/xen/xen-pciback/pciback_ops.c')
-rw-r--r-- | drivers/xen/xen-pciback/pciback_ops.c | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c index 8545ca78c4f1..e11a7438e1a2 100644 --- a/drivers/xen/xen-pciback/pciback_ops.c +++ b/drivers/xen/xen-pciback/pciback_ops.c @@ -15,9 +15,6 @@ #include <linux/sched.h> #include "pciback.h" -int verbose_request; -module_param(verbose_request, int, 0644); - static irqreturn_t xen_pcibk_guest_interrupt(int irq, void *dev_id); /* Ensure a device is has the fake IRQ handler "turned on/off" and is @@ -148,9 +145,6 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev, struct xen_pcibk_dev_data *dev_data; int status; - if (unlikely(verbose_request)) - dev_printk(KERN_DEBUG, &dev->dev, "enable MSI\n"); - if (dev->msi_enabled) status = -EALREADY; else if (dev->msix_enabled) @@ -169,8 +163,8 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev, * the local domain's IRQ number. */ op->value = dev->irq ? xen_pirq_from_irq(dev->irq) : 0; - if (unlikely(verbose_request)) - dev_printk(KERN_DEBUG, &dev->dev, "MSI: %d\n", op->value); + + dev_dbg(&dev->dev, "MSI: %d\n", op->value); dev_data = pci_get_drvdata(dev); if (dev_data) @@ -183,9 +177,6 @@ static int xen_pcibk_disable_msi(struct xen_pcibk_device *pdev, struct pci_dev *dev, struct xen_pci_op *op) { - if (unlikely(verbose_request)) - dev_printk(KERN_DEBUG, &dev->dev, "disable MSI\n"); - if (dev->msi_enabled) { struct xen_pcibk_dev_data *dev_data; @@ -196,8 +187,9 @@ int xen_pcibk_disable_msi(struct xen_pcibk_device *pdev, dev_data->ack_intr = 1; } op->value = dev->irq ? xen_pirq_from_irq(dev->irq) : 0; - if (unlikely(verbose_request)) - dev_printk(KERN_DEBUG, &dev->dev, "MSI: %d\n", op->value); + + dev_dbg(&dev->dev, "MSI: %d\n", op->value); + return 0; } @@ -210,8 +202,7 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev, struct msix_entry *entries; u16 cmd; - if (unlikely(verbose_request)) - dev_printk(KERN_DEBUG, &dev->dev, "enable MSI-X\n"); + dev_dbg(&dev->dev, "enable MSI-X\n"); if (op->value > SH_INFO_MAX_VEC) return -EINVAL; @@ -244,10 +235,8 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev, if (entries[i].vector) { op->msix_entries[i].vector = xen_pirq_from_irq(entries[i].vector); - if (unlikely(verbose_request)) - dev_printk(KERN_DEBUG, &dev->dev, - "MSI-X[%d]: %d\n", i, - op->msix_entries[i].vector); + dev_dbg(&dev->dev, "MSI-X[%d]: %d\n", i, + op->msix_entries[i].vector); } } } else @@ -267,9 +256,6 @@ static int xen_pcibk_disable_msix(struct xen_pcibk_device *pdev, struct pci_dev *dev, struct xen_pci_op *op) { - if (unlikely(verbose_request)) - dev_printk(KERN_DEBUG, &dev->dev, "disable MSI-X\n"); - if (dev->msix_enabled) { struct xen_pcibk_dev_data *dev_data; @@ -284,8 +270,9 @@ int xen_pcibk_disable_msix(struct xen_pcibk_device *pdev, * an undefined IRQ value of zero. */ op->value = dev->irq ? xen_pirq_from_irq(dev->irq) : 0; - if (unlikely(verbose_request)) - dev_printk(KERN_DEBUG, &dev->dev, "MSI-X: %d\n", op->value); + + dev_dbg(&dev->dev, "MSI-X: %d\n", op->value); + return 0; } #endif |