Message ID | 4e82e61c94f320aae692aaa0e55350049e17168f.1605896059.git.gustavoars@kernel.org |
---|---|
State | Accepted |
Commit | af7ab66225111d0612a38e63eae6cd4af66d43e6 |
Headers | show |
Series | Fix fall-through warnings for Clang | expand |
Em Fri, 20 Nov 2020 12:26:09 -0600 "Gustavo A. R. Silva" <gustavoars@kernel.org> escreveu: > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding multiple break and a return statements > instead of just letting the code fall through to the next case. Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> > > Link: https://github.com/KSPP/linux/issues/115 > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> > --- > drivers/media/dvb-frontends/cx24120.c | 1 + > drivers/media/dvb-frontends/dib0090.c | 2 ++ > drivers/media/dvb-frontends/drxk_hard.c | 1 + > drivers/media/dvb-frontends/m88rs2000.c | 1 + > 4 files changed, 5 insertions(+) > > diff --git a/drivers/media/dvb-frontends/cx24120.c b/drivers/media/dvb-frontends/cx24120.c > index 2464b63fe0cf..d8acd582c711 100644 > --- a/drivers/media/dvb-frontends/cx24120.c > +++ b/drivers/media/dvb-frontends/cx24120.c > @@ -363,6 +363,7 @@ static void cx24120_check_cmd(struct cx24120_state *state, u8 id) > case CMD_DISEQC_BURST: > cx24120_msg_mpeg_output_global_config(state, 0); > /* Old driver would do a msleep(100) here */ > + return; > default: > return; > } > diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c > index 08a85831e917..903da33642df 100644 > --- a/drivers/media/dvb-frontends/dib0090.c > +++ b/drivers/media/dvb-frontends/dib0090.c > @@ -1765,6 +1765,8 @@ static int dib0090_dc_offset_calibration(struct dib0090_state *state, enum front > dib0090_write_reg(state, 0x1f, 0x7); > *tune_state = CT_TUNER_START; /* reset done -> real tuning can now begin */ > state->calibrate &= ~DC_CAL; > + break; > + > default: > break; > } > diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c > index a57470bf71bf..d7fc2595f15b 100644 > --- a/drivers/media/dvb-frontends/drxk_hard.c > +++ b/drivers/media/dvb-frontends/drxk_hard.c > @@ -3294,6 +3294,7 @@ static int dvbt_sc_command(struct drxk_state *state, > case OFDM_SC_RA_RAM_CMD_USER_IO: > case OFDM_SC_RA_RAM_CMD_GET_OP_PARAM: > status = read16(state, OFDM_SC_RA_RAM_PARAM0__A, &(param0)); > + break; > /* All commands yielding 0 results */ > case OFDM_SC_RA_RAM_CMD_SET_ECHO_TIMING: > case OFDM_SC_RA_RAM_CMD_SET_TIMER: > diff --git a/drivers/media/dvb-frontends/m88rs2000.c b/drivers/media/dvb-frontends/m88rs2000.c > index 39cbb3ea1c9d..b294ba87e934 100644 > --- a/drivers/media/dvb-frontends/m88rs2000.c > +++ b/drivers/media/dvb-frontends/m88rs2000.c > @@ -390,6 +390,7 @@ static int m88rs2000_tab_set(struct m88rs2000_state *state, > case 0xff: > if (tab[i].reg == 0xaa && tab[i].val == 0xff) > return 0; > + break; > case 0x00: > break; > default: Thanks, Mauro
On Sun, Nov 22, 2020 at 05:31:16PM +0100, Mauro Carvalho Chehab wrote: > Em Fri, 20 Nov 2020 12:26:09 -0600 > "Gustavo A. R. Silva" <gustavoars@kernel.org> escreveu: > > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > > warnings by explicitly adding multiple break and a return statements > > instead of just letting the code fall through to the next case. > > Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Thanks, Mauro. -- Gustavo
diff --git a/drivers/media/dvb-frontends/cx24120.c b/drivers/media/dvb-frontends/cx24120.c index 2464b63fe0cf..d8acd582c711 100644 --- a/drivers/media/dvb-frontends/cx24120.c +++ b/drivers/media/dvb-frontends/cx24120.c @@ -363,6 +363,7 @@ static void cx24120_check_cmd(struct cx24120_state *state, u8 id) case CMD_DISEQC_BURST: cx24120_msg_mpeg_output_global_config(state, 0); /* Old driver would do a msleep(100) here */ + return; default: return; } diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c index 08a85831e917..903da33642df 100644 --- a/drivers/media/dvb-frontends/dib0090.c +++ b/drivers/media/dvb-frontends/dib0090.c @@ -1765,6 +1765,8 @@ static int dib0090_dc_offset_calibration(struct dib0090_state *state, enum front dib0090_write_reg(state, 0x1f, 0x7); *tune_state = CT_TUNER_START; /* reset done -> real tuning can now begin */ state->calibrate &= ~DC_CAL; + break; + default: break; } diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index a57470bf71bf..d7fc2595f15b 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c @@ -3294,6 +3294,7 @@ static int dvbt_sc_command(struct drxk_state *state, case OFDM_SC_RA_RAM_CMD_USER_IO: case OFDM_SC_RA_RAM_CMD_GET_OP_PARAM: status = read16(state, OFDM_SC_RA_RAM_PARAM0__A, &(param0)); + break; /* All commands yielding 0 results */ case OFDM_SC_RA_RAM_CMD_SET_ECHO_TIMING: case OFDM_SC_RA_RAM_CMD_SET_TIMER: diff --git a/drivers/media/dvb-frontends/m88rs2000.c b/drivers/media/dvb-frontends/m88rs2000.c index 39cbb3ea1c9d..b294ba87e934 100644 --- a/drivers/media/dvb-frontends/m88rs2000.c +++ b/drivers/media/dvb-frontends/m88rs2000.c @@ -390,6 +390,7 @@ static int m88rs2000_tab_set(struct m88rs2000_state *state, case 0xff: if (tab[i].reg == 0xaa && tab[i].val == 0xff) return 0; + break; case 0x00: break; default:
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break and a return 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/dvb-frontends/cx24120.c | 1 + drivers/media/dvb-frontends/dib0090.c | 2 ++ drivers/media/dvb-frontends/drxk_hard.c | 1 + drivers/media/dvb-frontends/m88rs2000.c | 1 + 4 files changed, 5 insertions(+)