linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Robert Baldyga <r.baldyga@samsung.com>, balbi@ti.com
Cc: gregkh@linuxfoundation.org, myungjoo.ham@samsung.com,
	cw00.choi@samsung.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.szyprowski@samsung.com
Subject: Re: [RFC 07/19] dwc3: core: cleanup suspend/resume code
Date: Wed, 18 Mar 2015 18:00:40 +0300	[thread overview]
Message-ID: <55099318.3010609@cogentembedded.com> (raw)
In-Reply-To: <1426687464-2563-8-git-send-email-r.baldyga@samsung.com>

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@samsung.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


  reply	other threads:[~2015-03-18 15:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 14:04 [RFC 00/19] dwc3: add USB OTG role switch support Robert Baldyga
2015-03-18 14:04 ` [RFC 01/19] extcon: add extcon-odroid-usbotg driver Robert Baldyga
2015-03-19  8:50   ` George Cherian
2015-03-19 12:07     ` Robert Baldyga
2015-03-19 12:19       ` George Cherian
2015-03-19 14:45         ` Roger Quadros
2015-03-19 20:50           ` Chanwoo Choi
2015-03-20  7:25             ` Robert Baldyga
2015-03-20  7:45               ` Chanwoo Choi
2015-03-20  8:51                 ` Roger Quadros
2015-03-18 14:04 ` [RFC 02/19] dt-bindings: extcon: Add doc for extcon-odroid-usbotg Robert Baldyga
2015-03-18 14:04 ` [RFC 03/19] ARM: dts: exynos5422-odroidxu3: add odroid-usbotg extcon support Robert Baldyga
2015-03-18 14:04 ` [RFC 04/19] dwc3: gadget: add VBUS session handling Robert Baldyga
2015-03-18 14:04 ` [RFC 05/19] dwc3: gadget: enable/disable ep0 in dwc3_gadget_run_stop() Robert Baldyga
2015-03-18 14:04 ` [RFC 06/19] dwc3: gadget: check returned value in suspend/resume Robert Baldyga
2015-03-18 14:04 ` [RFC 07/19] dwc3: core: cleanup suspend/resume code Robert Baldyga
2015-03-18 15:00   ` Sergei Shtylyov [this message]
2015-03-18 14:04 ` [RFC 08/19] dwc3: core: handle event buffers in core_init/exit Robert Baldyga
2015-03-18 14:04 ` [RFC 09/19] dwc3: core: make dwc3_core_init/exit non-static Robert Baldyga
2015-03-18 14:04 ` [RFC 10/19] dwc3: add missing OTG register definitions Robert Baldyga
2015-03-18 14:04 ` [RFC 11/19] dwc3: add OTG handling code Robert Baldyga
2015-03-19  7:38   ` George Cherian
2015-03-18 14:04 ` [RFC 12/19] dwc3: otg: add ext_otg_ops support Robert Baldyga
2015-03-18 14:04 ` [RFC 13/19] dwc3: gadget: register gadget in OTG core Robert Baldyga
2015-03-18 14:04 ` [RFC 14/19] dwc3: host: don't add XHCI device only if in OTG mode Robert Baldyga
2015-03-18 14:04 ` [RFC 15/19] dwc3: core: initialize OTG in DWC3 core Robert Baldyga
2015-03-18 14:04 ` [RFC 16/19] dwc3: exynos: add software role switching code Robert Baldyga
2015-03-18 14:04 ` [RFC 17/19] ARM: dts: exynos5420: set usb3_lpm_capable in dwc3 controllers Robert Baldyga
2015-03-18 14:04 ` [RFC 18/19] ARM: dts: exynos5420: add snps,dis_u3_susphy_quirk to " Robert Baldyga
2015-03-18 14:04 ` [RFC 19/19] ARM: dts: exynos5422-odroidxu3: make usbdrd3 extcon client Robert Baldyga
2015-03-19  2:33 ` [RFC 00/19] dwc3: add USB OTG role switch support Chanwoo Choi
2015-03-19  8:27   ` Robert Baldyga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55099318.3010609@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=balbi@ti.com \
    --cc=cw00.choi@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=r.baldyga@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).