* [PATCH v1 1/2] bcm47xx: Get rid of redundant 'else'
@ 2021-10-13 13:49 Andy Shevchenko
2021-10-13 13:49 ` [PATCH v1 2/2] bcm47xx: Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert() Andy Shevchenko
2021-10-18 16:17 ` [PATCH v1 1/2] bcm47xx: Get rid of redundant 'else' Thomas Bogendoerfer
0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2021-10-13 13:49 UTC (permalink / raw)
To: Andy Shevchenko, linux-mips, linux-kernel; +Cc: Thomas Bogendoerfer
In the snipped like
if (...)
return ...;
else
the 'else' is redundant. Get rid of it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/mips/pci/pci-bcm47xx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/mips/pci/pci-bcm47xx.c b/arch/mips/pci/pci-bcm47xx.c
index 230d7dd273e2..e8ff8e32a729 100644
--- a/arch/mips/pci/pci-bcm47xx.c
+++ b/arch/mips/pci/pci-bcm47xx.c
@@ -93,12 +93,10 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
#ifdef CONFIG_BCM47XX_SSB
if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_SSB)
return bcm47xx_pcibios_plat_dev_init_ssb(dev);
- else
#endif
#ifdef CONFIG_BCM47XX_BCMA
if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA)
return bcm47xx_pcibios_plat_dev_init_bcma(dev);
- else
#endif
- return 0;
+ return 0;
}
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v1 2/2] bcm47xx: Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert()
2021-10-13 13:49 [PATCH v1 1/2] bcm47xx: Get rid of redundant 'else' Andy Shevchenko
@ 2021-10-13 13:49 ` Andy Shevchenko
2021-10-18 16:17 ` Thomas Bogendoerfer
2021-10-18 16:17 ` [PATCH v1 1/2] bcm47xx: Get rid of redundant 'else' Thomas Bogendoerfer
1 sibling, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2021-10-13 13:49 UTC (permalink / raw)
To: Andy Shevchenko, linux-mips, linux-kernel; +Cc: Thomas Bogendoerfer
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(-)
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;
}
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/2] bcm47xx: Get rid of redundant 'else'
2021-10-13 13:49 [PATCH v1 1/2] bcm47xx: Get rid of redundant 'else' Andy Shevchenko
2021-10-13 13:49 ` [PATCH v1 2/2] bcm47xx: Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert() Andy Shevchenko
@ 2021-10-18 16:17 ` Thomas Bogendoerfer
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2021-10-18 16:17 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-mips, linux-kernel
On Wed, Oct 13, 2021 at 04:49:39PM +0300, Andy Shevchenko wrote:
> In the snipped like
>
> if (...)
> return ...;
> else
>
> the 'else' is redundant. Get rid of it.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> arch/mips/pci/pci-bcm47xx.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 2/2] bcm47xx: Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert()
2021-10-13 13:49 ` [PATCH v1 2/2] bcm47xx: Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert() Andy Shevchenko
@ 2021-10-18 16:17 ` Thomas Bogendoerfer
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2021-10-18 16:17 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-mips, linux-kernel
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.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-18 16:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 13:49 [PATCH v1 1/2] bcm47xx: Get rid of redundant 'else' Andy Shevchenko
2021-10-13 13:49 ` [PATCH v1 2/2] bcm47xx: Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert() Andy Shevchenko
2021-10-18 16:17 ` Thomas Bogendoerfer
2021-10-18 16:17 ` [PATCH v1 1/2] bcm47xx: Get rid of redundant 'else' Thomas Bogendoerfer
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).