diff mbox series

[v1,2/2] bcm47xx: Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert()

Message ID 20211013134940.83295-2-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit 4beaeb5f11f31615752024a86d4654e3568addf8
Headers show
Series [v1,1/2] bcm47xx: Get rid of redundant 'else' | expand

Commit Message

Andy Shevchenko Oct. 13, 2021, 1:49 p.m. UTC
Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert() which
provides PCI device name in a unified way.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/mips/pci/pci-bcm47xx.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Thomas Bogendoerfer Oct. 18, 2021, 4:17 p.m. UTC | #1
On Wed, Oct 13, 2021 at 04:49:40PM +0300, Andy Shevchenko wrote:
> Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert() which
> provides PCI device name in a unified way.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  arch/mips/pci/pci-bcm47xx.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)

applied to mips-next.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/pci/pci-bcm47xx.c b/arch/mips/pci/pci-bcm47xx.c
index e8ff8e32a729..ffac06a5ca20 100644
--- a/arch/mips/pci/pci-bcm47xx.c
+++ b/arch/mips/pci/pci-bcm47xx.c
@@ -41,8 +41,7 @@  static int bcm47xx_pcibios_plat_dev_init_ssb(struct pci_dev *dev)
 
 	res = ssb_pcibios_plat_dev_init(dev);
 	if (res < 0) {
-		printk(KERN_ALERT "PCI: Failed to init device %s\n",
-		       pci_name(dev));
+		pci_alert(dev, "PCI: Failed to init device\n");
 		return res;
 	}
 
@@ -52,8 +51,7 @@  static int bcm47xx_pcibios_plat_dev_init_ssb(struct pci_dev *dev)
 
 	/* IRQ-0 and IRQ-1 are software interrupts. */
 	if (res < 2) {
-		printk(KERN_ALERT "PCI: Failed to map IRQ of device %s\n",
-		       pci_name(dev));
+		pci_alert(dev, "PCI: Failed to map IRQ of device\n");
 		return res;
 	}
 
@@ -69,8 +67,7 @@  static int bcm47xx_pcibios_plat_dev_init_bcma(struct pci_dev *dev)
 
 	res = bcma_core_pci_plat_dev_init(dev);
 	if (res < 0) {
-		printk(KERN_ALERT "PCI: Failed to init device %s\n",
-		       pci_name(dev));
+		pci_alert(dev, "PCI: Failed to init device\n");
 		return res;
 	}
 
@@ -78,8 +75,7 @@  static int bcm47xx_pcibios_plat_dev_init_bcma(struct pci_dev *dev)
 
 	/* IRQ-0 and IRQ-1 are software interrupts. */
 	if (res < 2) {
-		printk(KERN_ALERT "PCI: Failed to map IRQ of device %s\n",
-		       pci_name(dev));
+		pci_alert(dev, "PCI: Failed to map IRQ of device\n");
 		return res;
 	}