OpenCloudOS-Kernel/sound/soc/sprd
Stephen Boyd cf9441adb1
ASoC: 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: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20190730181557.90391-50-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-02 12:12:31 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile ASoC: sprd: Add Spreadtrum multi-channel data transfer support 2019-04-25 19:43:49 +01:00
sprd-mcdt.c ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
sprd-mcdt.h ASoC: sprd: Add Spreadtrum multi-channel data transfer support 2019-04-25 19:43:49 +01:00
sprd-pcm-compress.c ASoC: sprd: Fix spelling mistake "faied" -> "failed" 2019-04-04 15:11:34 +07:00
sprd-pcm-dma.c ASoC: sprd: Add reserved DMA memory support 2019-05-06 22:48:03 +09:00
sprd-pcm-dma.h ASoC: sprd: Add Spreadtrum audio compress offload support 2019-04-02 12:57:03 +07:00