linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v6 25/57] media: Remove dev_err() usage after platform_get_irq()
Date: Thu, 8 Aug 2019 09:56:51 +0200	[thread overview]
Message-ID: <CAMuHMdV2786n3ex-rY7N5LdX4PpnqZ-tuX2SyTO0w+TRfrA84g@mail.gmail.com> (raw)
In-Reply-To: <20190730181557.90391-26-swboyd@chromium.org>

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: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: linux-media@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/media/platform/am437x/am437x-vpfe.c           | 1 -
>  drivers/media/platform/atmel/atmel-sama5d2-isc.c      | 7 ++-----
>  drivers/media/platform/exynos4-is/mipi-csis.c         | 4 +---
>  drivers/media/platform/imx-pxp.c                      | 4 +---
>  drivers/media/platform/omap3isp/isp.c                 | 1 -
>  drivers/media/platform/renesas-ceu.c                  | 4 +---
>  drivers/media/platform/rockchip/rga/rga.c             | 1 -
>  drivers/media/platform/s3c-camif/camif-core.c         | 4 +---
>  drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 8 ++------
>  drivers/media/platform/sti/hva/hva-hw.c               | 8 ++------
>  drivers/media/platform/stm32/stm32-dcmi.c             | 5 +----
>  drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c    | 7 ++-----
>  drivers/media/rc/img-ir/img-ir-core.c                 | 4 +---
>  drivers/media/rc/ir-hix5hd2.c                         | 4 +---
>  drivers/media/rc/meson-ir.c                           | 4 +---
>  drivers/media/rc/mtk-cir.c                            | 4 +---
>  drivers/media/rc/sunxi-cir.c                          | 1 -
>  17 files changed, 17 insertions(+), 54 deletions(-)

Looks like this didn't catch the double assignments in:

drivers/media/platform/rcar_fdp1.c:     fdp1->irq = ret =
platform_get_irq(pdev, 0);
drivers/media/platform/rcar_fdp1.c-     if (ret < 0) {
drivers/media/platform/rcar_fdp1.c-             dev_err(&pdev->dev,
"cannot find IRQ\n");
drivers/media/platform/rcar_fdp1.c-             return ret;
drivers/media/platform/rcar_fdp1.c-     }
drivers/media/platform/rcar_fdp1.c-
--
drivers/media/platform/rcar_jpu.c:      jpu->irq = ret =
platform_get_irq(pdev, 0);
drivers/media/platform/rcar_jpu.c-      if (ret < 0) {
drivers/media/platform/rcar_jpu.c-              dev_err(&pdev->dev,
"cannot find IRQ\n");
drivers/media/platform/rcar_jpu.c-              return ret;
drivers/media/platform/rcar_jpu.c-      }
drivers/media/platform/rcar_jpu.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

      reply	other threads:[~2019-08-08  7:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190730181557.90391-1-swboyd@chromium.org>
2019-07-30 18:15 ` [PATCH v6 25/57] media: Remove dev_err() usage after platform_get_irq() Stephen Boyd
2019-08-08  7:56   ` Geert Uytterhoeven [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdV2786n3ex-rY7N5LdX4PpnqZ-tuX2SyTO0w+TRfrA84g@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).