[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55099318.3010609@cogentembedded.com>
Date: Wed, 18 Mar 2015 18:00:40 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Robert Baldyga <r.baldyga@...sung.com>, balbi@...com
CC: gregkh@...uxfoundation.org, myungjoo.ham@...sung.com,
cw00.choi@...sung.com, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, m.szyprowski@...sung.com
Subject: Re: [RFC 07/19] dwc3: core: cleanup suspend/resume code
Hello.
On 3/18/2015 5:04 PM, Robert Baldyga wrote:
> Remove unused cases from switch-case statement and place
> dwc3_event_buffers_cleanup() function outside switch-case
> as it's called in each case anyway.
> Signed-off-by: Robert Baldyga <r.baldyga@...sung.com>
> ---
> drivers/usb/dwc3/core.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 2bbab3d..b040ce0 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1018,13 +1018,12 @@ static int dwc3_suspend(struct device *dev)
> case USB_DR_MODE_PERIPHERAL:
> case USB_DR_MODE_OTG:
> dwc3_gadget_suspend(dwc);
> - /* FALLTHROUGH */
Why are you removing comment that stays valid?
> - case USB_DR_MODE_HOST:
> default:
> - dwc3_event_buffers_cleanup(dwc);
> break;
> }
>
> + dwc3_event_buffers_cleanup(dwc);
> +
> dwc->gctl = dwc3_readl(dwc->regs, DWC3_GCTL);
> spin_unlock_irqrestore(&dwc->lock, flags);
>
> @@ -1061,10 +1060,7 @@ static int dwc3_resume(struct device *dev)
> case USB_DR_MODE_PERIPHERAL:
> case USB_DR_MODE_OTG:
> dwc3_gadget_resume(dwc);
> - /* FALLTHROUGH */
Likewise.
> - case USB_DR_MODE_HOST:
> default:
> - /* do nothing */
> break;
> }
>
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists