media: dvb-frontends: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:26:09 +0000 (19:26 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 27 Jan 2021 11:54:44 +0000 (12:54 +0100)
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>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/dvb-frontends/cx24120.c
drivers/media/dvb-frontends/dib0090.c
drivers/media/dvb-frontends/drxk_hard.c
drivers/media/dvb-frontends/m88rs2000.c

index 2464b63fe0cf4ed0053d4299a50e605506d5feb3..d8acd582c71118320490bc8d89eb68c5e392ac76 100644 (file)
@@ -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;
        }
index 08a85831e917f301a762fdc4012d951b68ca3c62..903da33642dff1e097b9e00e3e8c4fe290aa0eb5 100644 (file)
@@ -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;
        }
index a57470bf71bf3a944d98acec7b61b864b591b799..d7fc2595f15b8caaa0a673ad21ec026e41906309 100644 (file)
@@ -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:
index 39cbb3ea1c9dc02eef0d55002f64ecd4ad69569c..b294ba87e934f695e914fe26e5181401f4697104 100644 (file)
@@ -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: