Re: [PATCH v6 29/57] mmc: 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 10:58 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: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
> Cc: linux-mmc@xxxxxxxxxxxxxxx
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
> ---
>
> Please apply directly to subsystem trees
>
>  drivers/mmc/host/bcm2835.c       | 1 -
>  drivers/mmc/host/jz4740_mmc.c    | 1 -
>  drivers/mmc/host/meson-gx-mmc.c  | 1 -
>  drivers/mmc/host/mxcmmc.c        | 4 +---
>  drivers/mmc/host/s3cmci.c        | 1 -
>  drivers/mmc/host/sdhci-msm.c     | 2 --
>  drivers/mmc/host/sdhci-pltfm.c   | 1 -
>  drivers/mmc/host/sdhci-s3c.c     | 4 +---
>  drivers/mmc/host/sdhci_f_sdh30.c | 4 +---
>  drivers/mmc/host/uniphier-sd.c   | 4 +---
>  10 files changed, 4 insertions(+), 19 deletions(-)

Failed to catch:

drivers/mmc/host/sh_mmcif.c:    irq[0] = platform_get_irq(pdev, 0);
drivers/mmc/host/sh_mmcif.c:    irq[1] = platform_get_irq(pdev, 1);
drivers/mmc/host/sh_mmcif.c-    if (irq[0] < 0) {
drivers/mmc/host/sh_mmcif.c-            dev_err(dev, "Get irq error\n");
drivers/mmc/host/sh_mmcif.c-            return -ENXIO;
drivers/mmc/host/sh_mmcif.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]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux