Re: [PATCH v6 46/57] usb: Remove dev_err() usage after platform_get_irq()
From: Felipe Balbi
Date: Thu Aug 08 2019 - 08:40:39 EST
Hi,
Stephen Boyd <swboyd@xxxxxxxxxxxx> writes:
> 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: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: linux-usb@xxxxxxxxxxxxxxx
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
> ---
>
> Please apply directly to subsystem trees
>
> drivers/usb/chipidea/core.c | 1 -
> drivers/usb/dwc2/platform.c | 4 +---
> drivers/usb/dwc3/dwc3-keystone.c | 1 -
> drivers/usb/dwc3/dwc3-omap.c | 4 +---
> drivers/usb/gadget/udc/aspeed-vhub/core.c | 1 -
> drivers/usb/gadget/udc/bcm63xx_udc.c | 8 ++------
> drivers/usb/gadget/udc/bdc/bdc_core.c | 4 +---
> drivers/usb/gadget/udc/gr_udc.c | 8 ++------
> drivers/usb/gadget/udc/lpc32xx_udc.c | 5 +----
> drivers/usb/gadget/udc/renesas_usb3.c | 4 +---
> drivers/usb/gadget/udc/s3c-hsudc.c | 4 +---
> drivers/usb/gadget/udc/udc-xilinx.c | 4 +---
For dwc2, dwc3, gadget and usb/phy:
Acked-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
--
balbi
Attachment:
signature.asc
Description: PGP signature