提交 457b16d4 编写于 作者: G Gustavo A. R. Silva 提交者: Felipe Balbi

usb: gadget: goku_udc: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 145713
Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 1c236d41
...@@ -127,11 +127,15 @@ goku_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) ...@@ -127,11 +127,15 @@ goku_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
mode = 0; mode = 0;
max = get_unaligned_le16(&desc->wMaxPacketSize); max = get_unaligned_le16(&desc->wMaxPacketSize);
switch (max) { switch (max) {
case 64: mode++; case 64:
case 32: mode++; mode++; /* fall through */
case 16: mode++; case 32:
case 8: mode <<= 3; mode++; /* fall through */
break; case 16:
mode++; /* fall through */
case 8:
mode <<= 3;
break;
default: default:
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册