Re: [PATCH v6 31/57] pci: Remove dev_err() usage after platform_get_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stephen,

On Tue, Jul 30, 2019 at 8:21 PM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote:
> We don't need dev_err() messages when platform_get_irq() fails now that
> platform_get_irq() prints an error message itself when something goes
> wrong. Let's remove these prints with a simple semantic patch.
>
> // <smpl>
> @@
> expression ret;
> struct platform_device *E;
> @@
>
> ret =
> (
> platform_get_irq(E, ...)
> |
> platform_get_irq_byname(E, ...)
> );
>
> if ( \( ret < 0 \| ret <= 0 \) )
> {
> (
> -if (ret != -EPROBE_DEFER)
> -{ ...
> -dev_err(...);
> -... }
> |
> ...
> -dev_err(...);
> )
> ...
> }
> // </smpl>
>
> While we're here, remove braces on if statements that only have one
> statement (manually).
>
> Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> Cc: linux-pci@xxxxxxxxxxxxxxx
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
> ---
>
> Please apply directly to subsystem trees
>
>  drivers/pci/controller/dwc/pci-dra7xx.c     |  8 ++------
>  drivers/pci/controller/dwc/pci-exynos.c     |  8 ++------
>  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 |  4 +---
>  drivers/pci/controller/pci-tegra.c          |  8 ++------
>  drivers/pci/controller/pci-v3-semi.c        |  4 +---
>  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-mobiveil.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 ++---------
>  19 files changed, 23 insertions(+), 76 deletions(-)

Failed to catch:

drivers/pci/controller/pci-rcar-gen2.c: priv->irq = platform_get_irq(pdev, 0);
drivers/pci/controller/pci-rcar-gen2.c- priv->reg = reg;
drivers/pci/controller/pci-rcar-gen2.c- priv->dev = dev;
drivers/pci/controller/pci-rcar-gen2.c-
drivers/pci/controller/pci-rcar-gen2.c- if (priv->irq < 0) {
drivers/pci/controller/pci-rcar-gen2.c-         dev_err(dev, "no valid
irq found\n");
drivers/pci/controller/pci-rcar-gen2.c-         return priv->irq;
drivers/pci/controller/pci-rcar-gen2.c- }

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux