Browse Source

usb: dwc3: ep0: avoid empty-body warning

Building with W=1, we get a warning about harmless empty statements:

drivers/usb/dwc3/ep0.c: In function 'dwc3_ep0_handle_intf':
drivers/usb/dwc3/ep0.c:491:4: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]

Instead of adding empty braces which would introduce checkpatch.pl
warnings, we're just removing the code which doesn't do anything and
making sure we return 0 so USBCV tool is happy.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Arnd Bergmann 8 years ago
parent
commit
1c404b51a0
1 changed files with 7 additions and 6 deletions
  1. 7 6
      drivers/usb/dwc3/ep0.c

+ 7 - 6
drivers/usb/dwc3/ep0.c

@@ -486,12 +486,13 @@ static int dwc3_ep0_handle_intf(struct dwc3 *dwc,
 
 
 	switch (wValue) {
 	switch (wValue) {
 	case USB_INTRF_FUNC_SUSPEND:
 	case USB_INTRF_FUNC_SUSPEND:
-		if (wIndex & USB_INTRF_FUNC_SUSPEND_LP)
-			/* XXX enable Low power suspend */
-			;
-		if (wIndex & USB_INTRF_FUNC_SUSPEND_RW)
-			/* XXX enable remote wakeup */
-			;
+		/*
+		 * REVISIT: Ideally we would enable some low power mode here,
+		 * however it's unclear what we should be doing here.
+		 *
+		 * For now, we're not doing anything, just making sure we return
+		 * 0 so USB Command Verifier tests pass without any errors.
+		 */
 		break;
 		break;
 	default:
 	default:
 		ret = -EINVAL;
 		ret = -EINVAL;