Skip to contentSkip to conversation

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

PATCH In review Gustavo A. R. Silva 3 participants 3 messages Oct 24, 2017 – Oct 25, 2017 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: f_phonet: mark expected switch fall-throughs

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

Addresses-Coverity-ID: 115004
Addresses-Coverity-ID: 115005

---
 drivers/usb/gadget/function/f_phonet.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/gadget/function/f_phonet.c +2 -0
index 9c4c58e..710b688 100644
@@ -215,6 +215,7 @@ static void pn_tx_complete(struct usb_ep *ep, struct usb_request *req)
 	case -ESHUTDOWN: /* disconnected */
 	case -ECONNRESET: /* disabled */
 		dev->stats.tx_aborted_errors++;
+		/* fall through */
 	default:
 		dev->stats.tx_errors++;
 	}
@@ -362,6 +363,7 @@ static void pn_rx_complete(struct usb_ep *ep, struct usb_request *req)
 	/* Do resubmit in these cases: */
 	case -EOVERFLOW: /* request buffer overflow */
 		dev->stats.rx_over_errors++;
+		/* fall through */
 	default:
 		dev->stats.rx_errors++;
 		break;
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 6 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 115004
Addresses-Coverity-ID: 115005

Greg, I have already sent you my pull request. If you want, I can prepare a part 2, otherwise:

Signature · 1 line
balbi
#2 lore raw
Quoted 7 lines · Felipe Balbi

Hi,

Quoted 3 lines · Gustavo A. R. Silva

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

Quoted 8 lines
Quoted 3 lines

Addresses-Coverity-ID: 115004
Addresses-Coverity-ID: 115005

Greg, I have already sent you my pull request. If you want, I can prepare a part 2, otherwise:

Thanks for the ack, I can queue these up myself.

greg k-h