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

From: Mauro Carvalho Chehab
Date: Sun Nov 22 2020 - 11:32:18 EST


Em Fri, 20 Nov 2020 12:26:16 -0600
"Gustavo A. R. Silva" <gustavoars@xxxxxxxxxx> 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@xxxxxxxxxx>

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>

> ---
> 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