linux-brain/drivers/staging/most/dim2
Stephen Boyd 04d15d5cad staging: 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).

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20190730181557.90391-43-swboyd@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30 20:50:04 +02:00
..
Kconfig staging: add missing SPDX lines to Kconfig files 2019-04-03 11:10:15 +02:00
Makefile staging: add missing SPDX lines to Makefile files 2019-04-03 11:10:15 +02:00
dim2.c staging: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:50:04 +02:00
errors.h staging: most: dim2: errors.h: Correct SPDX-License-Identifier 2019-03-18 07:05:22 +01:00
hal.c staging: most: dim2: Remove function dimcb_io_write() 2019-07-22 07:34:10 +02:00
hal.h staging: most: dim2: Remove function dimcb_io_write() 2019-07-22 07:34:10 +02:00
reg.h staging: most: dim2: reg.h: Correct SPDX-License-Identifier 2019-03-18 07:05:22 +01:00
sysfs.c staging: most: make DEVICE_ATTR structures static 2017-11-28 13:36:21 +01:00
sysfs.h staging: most: dim2: sysfs.h: Correct SPDX-License-Identifier 2019-03-18 07:05:22 +01:00