public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: f_phonet: mark expected switch fall-throughs
@ 2017-10-24 19:52 Gustavo A. R. Silva
  2017-10-25  9:25 ` Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-24 19:52 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, 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
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/usb/gadget/function/f_phonet.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/gadget/function/f_phonet.c b/drivers/usb/gadget/function/f_phonet.c
index 9c4c58e..710b688 100644
--- a/drivers/usb/gadget/function/f_phonet.c
+++ b/drivers/usb/gadget/function/f_phonet.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: gadget: f_phonet: mark expected switch fall-throughs
  2017-10-24 19:52 [PATCH] usb: gadget: f_phonet: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2017-10-25  9:25 ` Felipe Balbi
  2017-10-25  9:33   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2017-10-25  9:25 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, Gustavo A. R. Silva

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]


Hi,

"Gustavo A. R. Silva" <garsilva@embeddedor.com> writes:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 115004
> Addresses-Coverity-ID: 115005
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

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

Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: gadget: f_phonet: mark expected switch fall-throughs
  2017-10-25  9:25 ` Felipe Balbi
@ 2017-10-25  9:33   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-10-25  9:33 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Gustavo A. R. Silva, linux-usb, linux-kernel

On Wed, Oct 25, 2017 at 12:25:36PM +0300, Felipe Balbi wrote:
> 
> Hi,
> 
> "Gustavo A. R. Silva" <garsilva@embeddedor.com> writes:
> > In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> > where we are expecting to fall through.
> >
> > Addresses-Coverity-ID: 115004
> > Addresses-Coverity-ID: 115005
> > Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> 
> Greg, I have already sent you my pull request. If you want, I can
> prepare a part 2, otherwise:
> 
> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>

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

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-25  9:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 19:52 [PATCH] usb: gadget: f_phonet: mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-25  9:25 ` Felipe Balbi
2017-10-25  9:33   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox