lkml.org 
[lkml]   [2019]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v6 31/57] pci: Remove dev_err() usage after platform_get_irq()
Hi Stephen,

On Tue, Jul 30, 2019 at 8:21 PM Stephen Boyd <swboyd@chromium.org> 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@google.com>
> Cc: linux-pci@vger.kernel.org
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
>
> 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@linux-m68k.org

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

\
 
 \ /
  Last update: 2019-08-08 10:03    [W:0.357 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site