]> asedeno.scripts.mit.edu Git - linux.git/commit
rtc: Remove dev_err() usage after platform_get_irq()
authorStephen Boyd <swboyd@chromium.org>
Tue, 30 Jul 2019 18:15:39 +0000 (11:15 -0700)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 13 Aug 2019 08:53:10 +0000 (10:53 +0200)
commitfaac910201e9beb66530bd8c3fe8a02d907ee2a9
treed6c6658682a9c1514e18e3295e9f4d9539f14ada
parentb0a3fa44659ccee87215600b4235982bc0f3e828
rtc: Remove dev_err() usage after platform_get_irq()

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: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20190730181557.90391-40-swboyd@chromium.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
27 files changed:
drivers/rtc/rtc-88pm80x.c
drivers/rtc/rtc-88pm860x.c
drivers/rtc/rtc-ac100.c
drivers/rtc/rtc-armada38x.c
drivers/rtc/rtc-asm9260.c
drivers/rtc/rtc-at91rm9200.c
drivers/rtc/rtc-at91sam9.c
drivers/rtc/rtc-bd70528.c
drivers/rtc/rtc-davinci.c
drivers/rtc/rtc-jz4740.c
drivers/rtc/rtc-max77686.c
drivers/rtc/rtc-mt7622.c
drivers/rtc/rtc-pic32.c
drivers/rtc/rtc-pm8xxx.c
drivers/rtc/rtc-puv3.c
drivers/rtc/rtc-pxa.c
drivers/rtc/rtc-rk808.c
drivers/rtc/rtc-s3c.c
drivers/rtc/rtc-sc27xx.c
drivers/rtc/rtc-spear.c
drivers/rtc/rtc-stm32.c
drivers/rtc/rtc-sun6i.c
drivers/rtc/rtc-sunxi.c
drivers/rtc/rtc-tegra.c
drivers/rtc/rtc-vt8500.c
drivers/rtc/rtc-xgene.c
drivers/rtc/rtc-zynqmp.c