diff mbox series

[014/141] media: usb: dvb-usb-v2: Fix fall-through warnings for Clang

Message ID 173371a50a3e26a2ab39baaa6aa883f6bd416b8a.1605896059.git.gustavoars@kernel.org
State Accepted
Commit 623cd8b13f633e64d0776b2ce8a29fdeaf93d42e
Headers show
Series Fix fall-through warnings for Clang | expand

Commit Message

Gustavo A. R. Silva Nov. 20, 2020, 6:26 p.m. UTC
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding a couple of break statements instead of
just letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/media/usb/dvb-usb-v2/af9015.c  | 1 +
 drivers/media/usb/dvb-usb-v2/lmedm04.c | 1 +
 2 files changed, 2 insertions(+)

Comments

Mauro Carvalho Chehab Nov. 22, 2020, 4:31 p.m. UTC | #1
Em Fri, 20 Nov 2020 12:26:16 -0600
"Gustavo A. R. Silva" <gustavoars@kernel.org> escreveu:

> In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple

> warnings by explicitly adding a couple of break statements instead of

> just letting the code fall through to the next case.

> 

> Link: https://github.com/KSPP/linux/issues/115

> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>


Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


> ---

>  drivers/media/usb/dvb-usb-v2/af9015.c  | 1 +

>  drivers/media/usb/dvb-usb-v2/lmedm04.c | 1 +

>  2 files changed, 2 insertions(+)

> 

> diff --git a/drivers/media/usb/dvb-usb-v2/af9015.c b/drivers/media/usb/dvb-usb-v2/af9015.c

> index c70b3cef3176..d33514acc2b5 100644

> --- a/drivers/media/usb/dvb-usb-v2/af9015.c

> +++ b/drivers/media/usb/dvb-usb-v2/af9015.c

> @@ -51,6 +51,7 @@ static int af9015_ctrl_msg(struct dvb_usb_device *d, struct req_t *req)

>  		if (((req->addr & 0xff00) == 0xff00) ||

>  		    ((req->addr & 0xff00) == 0xae00))

>  			state->buf[0] = WRITE_VIRTUAL_MEMORY;

> +		break;

>  	case WRITE_VIRTUAL_MEMORY:

>  	case COPY_FIRMWARE:

>  	case DOWNLOAD_FIRMWARE:

> diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c

> index 5a7a9522d46d..67c37fb267e3 100644

> --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c

> +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c

> @@ -336,6 +336,7 @@ static void lme2510_int_response(struct urb *lme_urb)

>  				st->signal_level = ibuf[5];

>  				st->signal_sn = ibuf[4];

>  				st->time_key = ibuf[7];

> +				break;

>  			default:

>  				break;

>  			}




Thanks,
Mauro
diff mbox series

Patch

diff --git a/drivers/media/usb/dvb-usb-v2/af9015.c b/drivers/media/usb/dvb-usb-v2/af9015.c
index c70b3cef3176..d33514acc2b5 100644
--- a/drivers/media/usb/dvb-usb-v2/af9015.c
+++ b/drivers/media/usb/dvb-usb-v2/af9015.c
@@ -51,6 +51,7 @@  static int af9015_ctrl_msg(struct dvb_usb_device *d, struct req_t *req)
 		if (((req->addr & 0xff00) == 0xff00) ||
 		    ((req->addr & 0xff00) == 0xae00))
 			state->buf[0] = WRITE_VIRTUAL_MEMORY;
+		break;
 	case WRITE_VIRTUAL_MEMORY:
 	case COPY_FIRMWARE:
 	case DOWNLOAD_FIRMWARE:
diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
index 5a7a9522d46d..67c37fb267e3 100644
--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
+++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
@@ -336,6 +336,7 @@  static void lme2510_int_response(struct urb *lme_urb)
 				st->signal_level = ibuf[5];
 				st->signal_sn = ibuf[4];
 				st->time_key = ibuf[7];
+				break;
 			default:
 				break;
 			}