mbox series

[00/10] Remove surplus dev_err() when handing an error from platform_get_irq()

Message ID 20200802142601.1635926-1-kw@linux.com (mailing list archive)
Headers show
Series Remove surplus dev_err() when handing an error from platform_get_irq() | expand

Message

Krzysztof Wilczyński Aug. 2, 2020, 2:25 p.m. UTC
At the moment a lot of error handling code would print a duplicated
error message should either the platform_get_irq() or
platform_get_irq_byname() function fails to obtain an IRQ for a device.

There is no need to call the dev_err() function directly to print
a custom message when handling an error from either of these functions
as both are going to display an appropriate error message in case of
a failure.

This series aims to remove surplus call to dev_err() when handing an
error originating from either platform_get_irq() or
platform_get_irq_byname() function as per suggestion from Coccinelle.

Related commits are commit 7723f4c5ecdb ("driver core: platform: Add an
error message to platform_get_irq*()") and commit 98051ba2b28b
("coccinelle: Add script to check for platform_get_irq() excessive
prints").

Krzysztof Wilczyński (10):
  PCI: dwc: Remove dev_err() when handing an error from
    platform_get_irq()
  PCI: mobiveil: Remove dev_err() when handing an error from
    platform_get_irq()
  PCI: tegra: Remove dev_err() when handing an error from
    platform_get_irq()
  PCI: altera: Remove dev_err() when handing an error from
    platform_get_irq()
  PCI: host-generic: Remove dev_err() when handing an error from
    platform_get_irq()
  PCI: v3-semi: Remove dev_err() when handing an error from
    platform_get_irq()
  PCI: altera-msi: Remove dev_err() when handing an error from
    platform_get_irq()
  PCI: xgene-msi: Remove dev_err() when handing an error from
    platform_get_irq()
  PCI: rockchip: Remove dev_err() when handing an error from
    platform_get_irq()
  PCI: xilinx-nwl: Remove dev_err() when handing an error from
    platform_get_irq()

 drivers/pci/controller/dwc/pci-dra7xx.c              |  8 ++------
 drivers/pci/controller/dwc/pci-exynos.c              |  9 +++------
 drivers/pci/controller/dwc/pci-imx6.c                |  4 +---
 drivers/pci/controller/dwc/pci-keystone.c            |  4 +---
 drivers/pci/controller/dwc/pci-meson.c               |  4 +---
 drivers/pci/controller/dwc/pcie-armada8k.c           |  4 +---
 drivers/pci/controller/dwc/pcie-artpec6.c            |  4 +---
 drivers/pci/controller/dwc/pcie-histb.c              |  4 +---
 drivers/pci/controller/dwc/pcie-kirin.c              |  5 +----
 drivers/pci/controller/dwc/pcie-spear13xx.c          |  5 ++---
 drivers/pci/controller/dwc/pcie-tegra194.c           |  4 +---
 .../pci/controller/mobiveil/pcie-layerscape-gen4.c   |  5 ++---
 drivers/pci/controller/mobiveil/pcie-mobiveil-host.c |  4 +---
 drivers/pci/controller/pci-tegra.c                   |  8 ++------
 drivers/pci/controller/pci-v3-semi.c                 |  5 ++---
 drivers/pci/controller/pci-xgene-msi.c               |  2 --
 drivers/pci/controller/pcie-altera-msi.c             |  1 -
 drivers/pci/controller/pcie-altera.c                 |  4 +---
 drivers/pci/controller/pcie-rockchip-host.c          | 12 +++---------
 drivers/pci/controller/pcie-tango.c                  |  4 +---
 drivers/pci/controller/pcie-xilinx-nwl.c             | 11 ++---------
 21 files changed, 29 insertions(+), 82 deletions(-)

Comments

Bjorn Helgaas Aug. 3, 2020, 2:01 a.m. UTC | #1
On Sun, Aug 02, 2020 at 02:25:52PM +0000, Krzysztof Wilczyński wrote:
> At the moment a lot of error handling code would print a duplicated
> error message should either the platform_get_irq() or
> platform_get_irq_byname() function fails to obtain an IRQ for a device.
> 
> There is no need to call the dev_err() function directly to print
> a custom message when handling an error from either of these functions
> as both are going to display an appropriate error message in case of
> a failure.
> 
> This series aims to remove surplus call to dev_err() when handing an
> error originating from either platform_get_irq() or
> platform_get_irq_byname() function as per suggestion from Coccinelle.
> 
> Related commits are commit 7723f4c5ecdb ("driver core: platform: Add an
> error message to platform_get_irq*()") and commit 98051ba2b28b
> ("coccinelle: Add script to check for platform_get_irq() excessive
> prints").
> 
> Krzysztof Wilczyński (10):
>   PCI: dwc: Remove dev_err() when handing an error from
>     platform_get_irq()
>   PCI: mobiveil: Remove dev_err() when handing an error from
>     platform_get_irq()
>   PCI: tegra: Remove dev_err() when handing an error from
>     platform_get_irq()
>   PCI: altera: Remove dev_err() when handing an error from
>     platform_get_irq()
>   PCI: host-generic: Remove dev_err() when handing an error from
>     platform_get_irq()
>   PCI: v3-semi: Remove dev_err() when handing an error from
>     platform_get_irq()
>   PCI: altera-msi: Remove dev_err() when handing an error from
>     platform_get_irq()
>   PCI: xgene-msi: Remove dev_err() when handing an error from
>     platform_get_irq()
>   PCI: rockchip: Remove dev_err() when handing an error from
>     platform_get_irq()
>   PCI: xilinx-nwl: Remove dev_err() when handing an error from
>     platform_get_irq()
> 
>  drivers/pci/controller/dwc/pci-dra7xx.c              |  8 ++------
>  drivers/pci/controller/dwc/pci-exynos.c              |  9 +++------
>  drivers/pci/controller/dwc/pci-imx6.c                |  4 +---
>  drivers/pci/controller/dwc/pci-keystone.c            |  4 +---
>  drivers/pci/controller/dwc/pci-meson.c               |  4 +---
>  drivers/pci/controller/dwc/pcie-armada8k.c           |  4 +---
>  drivers/pci/controller/dwc/pcie-artpec6.c            |  4 +---
>  drivers/pci/controller/dwc/pcie-histb.c              |  4 +---
>  drivers/pci/controller/dwc/pcie-kirin.c              |  5 +----
>  drivers/pci/controller/dwc/pcie-spear13xx.c          |  5 ++---
>  drivers/pci/controller/dwc/pcie-tegra194.c           |  4 +---
>  .../pci/controller/mobiveil/pcie-layerscape-gen4.c   |  5 ++---
>  drivers/pci/controller/mobiveil/pcie-mobiveil-host.c |  4 +---
>  drivers/pci/controller/pci-tegra.c                   |  8 ++------
>  drivers/pci/controller/pci-v3-semi.c                 |  5 ++---
>  drivers/pci/controller/pci-xgene-msi.c               |  2 --
>  drivers/pci/controller/pcie-altera-msi.c             |  1 -
>  drivers/pci/controller/pcie-altera.c                 |  4 +---
>  drivers/pci/controller/pcie-rockchip-host.c          | 12 +++---------
>  drivers/pci/controller/pcie-tango.c                  |  4 +---
>  drivers/pci/controller/pcie-xilinx-nwl.c             | 11 ++---------
>  21 files changed, 29 insertions(+), 82 deletions(-)

I squashed these together and applied them to pci/irq-error for v5.9,
thanks!

The cover letter claims there should be 10 patches, but I only got 9.
Just FYI.
Krzysztof Wilczyński Aug. 3, 2020, 11:10 a.m. UTC | #2
On 20-08-02 21:01:51, Bjorn Helgaas wrote:

Hi Bjorn,

[...]
>
> I squashed these together and applied them to pci/irq-error for v5.9,
> thanks!

Thank you!

> The cover letter claims there should be 10 patches, but I only got 9.
> Just FYI.

There indeed should be 10 patches.  I sent the missing one (not should
why it didn't go through) this morning making sure it falls under the
thread with the cover letter.

Sorry about that!

The missing patch can be seen here:
  https://patchwork.kernel.org/patch/11697463/

Krzysztof
Bjorn Helgaas Aug. 3, 2020, 2:55 p.m. UTC | #3
On Sun, Aug 02, 2020 at 09:01:51PM -0500, Bjorn Helgaas wrote:
> On Sun, Aug 02, 2020 at 02:25:52PM +0000, Krzysztof Wilczyński wrote:
> > At the moment a lot of error handling code would print a duplicated
> > error message should either the platform_get_irq() or
> > platform_get_irq_byname() function fails to obtain an IRQ for a device.
> > 
> > There is no need to call the dev_err() function directly to print
> > a custom message when handling an error from either of these functions
> > as both are going to display an appropriate error message in case of
> > a failure.
> > 
> > This series aims to remove surplus call to dev_err() when handing an
> > error originating from either platform_get_irq() or
> > platform_get_irq_byname() function as per suggestion from Coccinelle.
> > 
> > Related commits are commit 7723f4c5ecdb ("driver core: platform: Add an
> > error message to platform_get_irq*()") and commit 98051ba2b28b
> > ("coccinelle: Add script to check for platform_get_irq() excessive
> > prints").
> > 
> > Krzysztof Wilczyński (10):
> >   PCI: dwc: Remove dev_err() when handing an error from
> >     platform_get_irq()
> >   PCI: mobiveil: Remove dev_err() when handing an error from
> >     platform_get_irq()
> >   PCI: tegra: Remove dev_err() when handing an error from
> >     platform_get_irq()
> >   PCI: altera: Remove dev_err() when handing an error from
> >     platform_get_irq()
> >   PCI: host-generic: Remove dev_err() when handing an error from
> >     platform_get_irq()
> >   PCI: v3-semi: Remove dev_err() when handing an error from
> >     platform_get_irq()
> >   PCI: altera-msi: Remove dev_err() when handing an error from
> >     platform_get_irq()
> >   PCI: xgene-msi: Remove dev_err() when handing an error from
> >     platform_get_irq()
> >   PCI: rockchip: Remove dev_err() when handing an error from
> >     platform_get_irq()
> >   PCI: xilinx-nwl: Remove dev_err() when handing an error from
> >     platform_get_irq()
> > 
> >  drivers/pci/controller/dwc/pci-dra7xx.c              |  8 ++------
> >  drivers/pci/controller/dwc/pci-exynos.c              |  9 +++------
> >  drivers/pci/controller/dwc/pci-imx6.c                |  4 +---
> >  drivers/pci/controller/dwc/pci-keystone.c            |  4 +---
> >  drivers/pci/controller/dwc/pci-meson.c               |  4 +---
> >  drivers/pci/controller/dwc/pcie-armada8k.c           |  4 +---
> >  drivers/pci/controller/dwc/pcie-artpec6.c            |  4 +---
> >  drivers/pci/controller/dwc/pcie-histb.c              |  4 +---
> >  drivers/pci/controller/dwc/pcie-kirin.c              |  5 +----
> >  drivers/pci/controller/dwc/pcie-spear13xx.c          |  5 ++---
> >  drivers/pci/controller/dwc/pcie-tegra194.c           |  4 +---
> >  .../pci/controller/mobiveil/pcie-layerscape-gen4.c   |  5 ++---
> >  drivers/pci/controller/mobiveil/pcie-mobiveil-host.c |  4 +---
> >  drivers/pci/controller/pci-tegra.c                   |  8 ++------
> >  drivers/pci/controller/pci-v3-semi.c                 |  5 ++---
> >  drivers/pci/controller/pci-xgene-msi.c               |  2 --
> >  drivers/pci/controller/pcie-altera-msi.c             |  1 -
> >  drivers/pci/controller/pcie-altera.c                 |  4 +---
> >  drivers/pci/controller/pcie-rockchip-host.c          | 12 +++---------
> >  drivers/pci/controller/pcie-tango.c                  |  4 +---
> >  drivers/pci/controller/pcie-xilinx-nwl.c             | 11 ++---------
> >  21 files changed, 29 insertions(+), 82 deletions(-)
> 
> I squashed these together and applied them to pci/irq-error for v5.9,
> thanks!
> 
> The cover letter claims there should be 10 patches, but I only got 9.
> Just FYI.

I picked up and applied 10/10 as well.  And added Jesper & Ley Foon's
reviewed-by and acked-by.  Thanks!