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 <[email protected]>
---
  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to