media: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 24 Jul 2020 22:10:14 +0000 (00:10 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 29 Aug 2020 06:35:27 +0000 (08:35 +0200)
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
55 files changed:
drivers/media/cec/core/cec-adap.c
drivers/media/cec/core/cec-pin.c
drivers/media/cec/usb/pulse8/pulse8-cec.c
drivers/media/common/videobuf2/videobuf2-v4l2.c
drivers/media/dvb-frontends/af9013.c
drivers/media/dvb-frontends/lg2160.c
drivers/media/dvb-frontends/m88ds3103.c
drivers/media/i2c/adv7180.c
drivers/media/i2c/adv7511-v4l2.c
drivers/media/i2c/msp3400-kthreads.c
drivers/media/i2c/ov5640.c
drivers/media/i2c/ov6650.c
drivers/media/i2c/ov9640.c
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c
drivers/media/i2c/smiapp/smiapp-core.c
drivers/media/i2c/tda1997x.c
drivers/media/i2c/tvp5150.c
drivers/media/pci/bt8xx/bttv-driver.c
drivers/media/pci/cx88/cx88-cards.c
drivers/media/pci/cx88/cx88-video.c
drivers/media/pci/saa7134/saa7134-cards.c
drivers/media/pci/solo6x10/solo6x10-core.c
drivers/media/pci/solo6x10/solo6x10-i2c.c
drivers/media/platform/coda/coda-bit.c
drivers/media/platform/coda/coda-common.c
drivers/media/platform/exynos4-is/fimc-capture.c
drivers/media/platform/exynos4-is/fimc-reg.c
drivers/media/platform/exynos4-is/media-dev.c
drivers/media/platform/marvell-ccic/mcam-core.c
drivers/media/platform/omap3isp/ispvideo.c
drivers/media/platform/qcom/venus/vdec.c
drivers/media/platform/renesas-ceu.c
drivers/media/radio/si4713/si4713.c
drivers/media/rc/iguanair.c
drivers/media/test-drivers/vicodec/vicodec-core.c
drivers/media/test-drivers/vivid/vivid-vbi-gen.c
drivers/media/tuners/fc0011.c
drivers/media/tuners/tda18271-fe.c
drivers/media/usb/dvb-usb-v2/af9015.c
drivers/media/usb/dvb-usb-v2/gl861.c
drivers/media/usb/dvb-usb-v2/lmedm04.c
drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c
drivers/media/usb/em28xx/em28xx-audio.c
drivers/media/usb/go7007/go7007-driver.c
drivers/media/usb/gspca/mr97310a.c
drivers/media/usb/gspca/nw80x.c
drivers/media/usb/gspca/ov519.c
drivers/media/usb/gspca/sn9c20x.c
drivers/media/usb/gspca/sunplus.c
drivers/media/usb/gspca/xirlink_cit.c
drivers/media/usb/gspca/zc3xx.c
drivers/media/usb/pwc/pwc-v4l.c
drivers/media/usb/siano/smsusb.c
drivers/media/usb/tm6000/tm6000-alsa.c
drivers/media/usb/uvc/uvc_video.c

index 4efe8014445ea1e89476f238d6d083ddaf429313..80fd5165f658b52fc03124671d235495fb41d632 100644 (file)
@@ -1928,7 +1928,7 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg,
                 */
                if (!adap->passthrough && from_unregistered)
                        return 0;
-               /* Fall through */
+               fallthrough;
        case CEC_MSG_GIVE_DEVICE_VENDOR_ID:
        case CEC_MSG_GIVE_FEATURES:
        case CEC_MSG_GIVE_PHYSICAL_ADDR:
index 660fe111f5409c87ada64fe7dc25be5b2c747ee1..f006bd8eec63c0808f8dd09fb3ced709ae3642a5 100644 (file)
@@ -417,7 +417,7 @@ static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts)
                        wake_up_interruptible(&pin->kthread_waitq);
                        break;
                }
-               /* fall through */
+               fallthrough;
        case CEC_ST_TX_DATA_BIT_0_HIGH:
        case CEC_ST_TX_DATA_BIT_0_HIGH_SHORT:
        case CEC_ST_TX_DATA_BIT_0_HIGH_LONG:
@@ -445,7 +445,7 @@ static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts)
                        wake_up_interruptible(&pin->kthread_waitq);
                        break;
                }
-               /* fall through */
+               fallthrough;
        case CEC_ST_TX_DATA_BIT_HIGH_CUSTOM:
                if (tx_last_bit(pin)) {
                        /* Error Injection: just stop sending after this bit */
@@ -459,7 +459,7 @@ static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts)
                        break;
                }
                pin->tx_bit++;
-               /* fall through */
+               fallthrough;
        case CEC_ST_TX_START_BIT_HIGH:
        case CEC_ST_TX_START_BIT_HIGH_SHORT:
        case CEC_ST_TX_START_BIT_HIGH_LONG:
index beae6aa12638a95bcf635a941c4cda7a7c9987c7..e4d8446b87da94d1219bafb09101c0e0a66daf69 100644 (file)
@@ -389,7 +389,7 @@ static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data,
                                pulse8->new_rx_msg[0] = pulse8->buf[1];
                                break;
                        }
-                       /* fall through */
+                       fallthrough;
                case MSGCODE_FRAME_DATA:
                        if (pulse8->new_rx_msg_len < CEC_MAX_MSG_SIZE)
                                pulse8->new_rx_msg[pulse8->new_rx_msg_len++] =
index 2068305ad458f9db27125f5eb3724dd704f6bf2e..f4197c2e1f30920697c4124c2d68ead272d7c1ef 100644 (file)
@@ -601,7 +601,7 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, void *pb)
                break;
        case VB2_BUF_STATE_ERROR:
                b->flags |= V4L2_BUF_FLAG_ERROR;
-               /* fall through */
+               fallthrough;
        case VB2_BUF_STATE_DONE:
                b->flags |= V4L2_BUF_FLAG_DONE;
                break;
index 7281899bd7ae3759cfa633b364fe3a85fa9f9081..7d7c341b2bd84067bd9d8b0c4911540e4fde7055 100644 (file)
@@ -597,7 +597,7 @@ static int af9013_read_status(struct dvb_frontend *fe, enum fe_status *status)
                        state->strength_en = 2;
                        break;
                }
-               /* Fall through */
+               fallthrough;
        case 1:
                if (time_is_after_jiffies(state->strength_jiffies + msecs_to_jiffies(2000)))
                        break;
index 10c152f461dd182b3e3bdc293a3237a1cdbfbf5c..f343066c297e2b4e62a43696ae11652705891ac5 100644 (file)
@@ -1408,7 +1408,7 @@ struct dvb_frontend *lg2160_attach(const struct lg2160_config *config,
        switch (config->lg_chip) {
        default:
                lg_warn("invalid chip requested, defaulting to LG2160");
-               /* fall-thru */
+               fallthrough;
        case LG2160:
                memcpy(&state->frontend.ops, &lg2160_ops,
                       sizeof(struct dvb_frontend_ops));
index f204e715bc59d0696e46a4964425eb1565e8bd23..ad6d9d564a87e810e67aebf8eb73e9f389f49c5f 100644 (file)
@@ -906,7 +906,7 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)
                        if (ret)
                                goto err;
                }
-               /* fall through */
+               fallthrough;
        default:
                u16tmp = DIV_ROUND_UP(target_mclk, dev->cfg->ts_clk);
                u8tmp1 = u16tmp / 2 - 1;
index e8744efe3cf0e7705826828ae0360a5a12de6c64..4498d14d34291b40699c7d9085d5ec66e8b27123 100644 (file)
@@ -726,7 +726,7 @@ static int adv7180_set_pad_format(struct v4l2_subdev *sd,
        case V4L2_FIELD_NONE:
                if (state->chip_info->flags & ADV7180_FLAG_I2P)
                        break;
-               /* fall through */
+               fallthrough;
        default:
                format->format.field = V4L2_FIELD_ALTERNATE;
                break;
index 62763ec4cd073a567b3893d0090fdfbf67dc2281..a3161d7090153f74bb3d5e99fddae6ecc708519e 100644 (file)
@@ -470,7 +470,7 @@ static int adv7511_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *
                        reg->val = adv7511_cec_read(sd, reg->reg & 0xff);
                        break;
                }
-               /* fall through */
+               fallthrough;
        default:
                v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
                adv7511_inv_register(sd);
@@ -492,7 +492,7 @@ static int adv7511_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_regi
                        adv7511_cec_write(sd, reg->reg & 0xff, reg->val & 0xff);
                        break;
                }
-               /* fall through */
+               fallthrough;
        default:
                v4l2_info(sd, "Register %03llx not supported\n", reg->reg);
                adv7511_inv_register(sd);
index d3b0d1c18efdb4dac8d1142c63284c7d0aeb59eb..52e506f86de525ec9c7d7b1bdbb1cf1ed330c8c6 100644 (file)
@@ -646,7 +646,7 @@ restart:
                        break;
                case 0: /* 4.5 */
                        state->detected_std = V4L2_STD_MN;
-                       /* fall-through */
+                       fallthrough;
                default:
 no_second:
                        state->second = msp3400c_carrier_detect_main[max1].cdo;
index 2fe4a7ac0592963ee6659ab800678440e3c02bc1..ccdabc7948a73aaaecb4a2709839964a74abf681 100644 (file)
@@ -3010,7 +3010,7 @@ static int ov5640_probe(struct i2c_client *client)
                switch (rotation) {
                case 180:
                        sensor->upside_down = true;
-                       /* fall through */
+                       fallthrough;
                case 0:
                        break;
                default:
index 48493af81198625ebfcf1f3598a357ae82e93f5e..d73f9f540932861253cef9539708a40f35efa3a3 100644 (file)
@@ -685,7 +685,7 @@ static int ov6650_set_fmt(struct v4l2_subdev *sd,
        switch (mf->code) {
        case MEDIA_BUS_FMT_Y10_1X10:
                mf->code = MEDIA_BUS_FMT_Y8_1X8;
-               /* fall through */
+               fallthrough;
        case MEDIA_BUS_FMT_Y8_1X8:
        case MEDIA_BUS_FMT_YVYU8_2X8:
        case MEDIA_BUS_FMT_YUYV8_2X8:
@@ -694,7 +694,7 @@ static int ov6650_set_fmt(struct v4l2_subdev *sd,
                break;
        default:
                mf->code = MEDIA_BUS_FMT_SBGGR8_1X8;
-               /* fall through */
+               fallthrough;
        case MEDIA_BUS_FMT_SBGGR8_1X8:
                break;
        }
index fbd5d7b75811f5ea4b3a8a16b8f4ec3e4afa6c4e..e2a25240fc855aee870af89d36342958858bb7d1 100644 (file)
@@ -538,7 +538,7 @@ static int ov9640_set_fmt(struct v4l2_subdev *sd,
                break;
        default:
                mf->code = MEDIA_BUS_FMT_UYVY8_2X8;
-               /* fall through */
+               fallthrough;
        case MEDIA_BUS_FMT_UYVY8_2X8:
                mf->colorspace = V4L2_COLORSPACE_JPEG;
                break;
index 71cf68a95bb236110abb64b038a2d48f3cb3615e..141ad0ba7f5a4aba9c5c8d832d511c3c7a402172 100644 (file)
@@ -46,7 +46,7 @@ static int s5c73m3_get_af_status(struct s5c73m3 *state, struct v4l2_ctrl *ctrl)
                break;
        default:
                v4l2_info(&state->sensor_sd, "Unknown AF status %#x\n", reg);
-               /* Fall through */
+               fallthrough;
        case REG_CAF_STATUS_UNFOCUSED:
        case REG_AF_STATUS_UNFOCUSED:
        case REG_AF_STATUS_INVALID:
index 8a9c7de0c056dabe1d864c56b2ff15285d7ab166..6fc0680a93d04c8d142f24dd76b8a9f08375ef23 100644 (file)
@@ -1721,7 +1721,7 @@ static void smiapp_propagate(struct v4l2_subdev *subdev,
                                sensor->binning_vertical = 1;
                        }
                }
-               /* Fall through */
+               fallthrough;
        case V4L2_SEL_TGT_COMPOSE:
                *crops[SMIAPP_PAD_SRC] = *comp;
                break;
@@ -2120,7 +2120,7 @@ static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
                    && SMIA_LIM(sensor, SCALING_CAPABILITY)
                    != SMIAPP_SCALING_CAPABILITY_NONE)
                        return 0;
-               /* Fall through */
+               fallthrough;
        default:
                return -EINVAL;
        }
@@ -2795,7 +2795,7 @@ static struct smiapp_hwconfig *smiapp_get_hwconfig(struct device *dev)
                case 180:
                        hwcfg->module_board_orient =
                                SMIAPP_MODULE_BOARD_ORIENT_180;
-                       /* Fall through */
+                       fallthrough;
                case 0:
                        break;
                default:
index 483cc19ed75dd34b3501396d15a79f7c883ae86e..a09bf0a39d05882fc9e847ea41d20c24585a810d 100644 (file)
@@ -2588,7 +2588,7 @@ static int tda1997x_probe(struct i2c_client *client,
                        case 36:
                                mbus_codes[i++] = MEDIA_BUS_FMT_RGB121212_1X36;
                                mbus_codes[i++] = MEDIA_BUS_FMT_YUV12_1X36;
-                               /* fall-through */
+                               fallthrough;
                        case 24:
                                mbus_codes[i++] = MEDIA_BUS_FMT_UYVY12_1X24;
                                break;
@@ -2617,10 +2617,10 @@ static int tda1997x_probe(struct i2c_client *client,
                                mbus_codes[i++] = MEDIA_BUS_FMT_RGB888_1X24;
                                mbus_codes[i++] = MEDIA_BUS_FMT_YUV8_1X24;
                                mbus_codes[i++] = MEDIA_BUS_FMT_UYVY12_1X24;
-                               /* fall through */
+                               fallthrough;
                        case 20:
                                mbus_codes[i++] = MEDIA_BUS_FMT_UYVY10_1X20;
-                               /* fall through */
+                               fallthrough;
                        case 16:
                                mbus_codes[i++] = MEDIA_BUS_FMT_UYVY8_1X16;
                                break;
@@ -2633,10 +2633,10 @@ static int tda1997x_probe(struct i2c_client *client,
                        case 16:
                        case 12:
                                mbus_codes[i++] = MEDIA_BUS_FMT_UYVY12_2X12;
-                               /* fall through */
+                               fallthrough;
                        case 10:
                                mbus_codes[i++] = MEDIA_BUS_FMT_UYVY10_2X10;
-                               /* fall through */
+                               fallthrough;
                        case 8:
                                mbus_codes[i++] = MEDIA_BUS_FMT_UYVY8_2X8;
                                break;
index 1c2050944b922b414bfcdb81c480a7e944256544..7d9401219a3ac6e81c5b042b6d32d10622655f0f 100644 (file)
@@ -293,7 +293,7 @@ static void tvp5150_selmux(struct v4l2_subdev *sd)
        switch (decoder->input) {
        case TVP5150_COMPOSITE1:
                input |= 2;
-               /* fall through */
+               fallthrough;
        case TVP5150_COMPOSITE0:
                break;
        case TVP5150_SVIDEO:
index 9144f795fb933048802ccf96725b8b49a07456f5..8c61d292dec13052e13870cbc796f7f2f0d4e1f3 100644 (file)
@@ -2332,7 +2332,7 @@ static int bttv_try_fmt_vid_cap(struct file *file, void *priv,
                        field = V4L2_FIELD_SEQ_TB;
                        break;
                }
-               /* fall through */
+               fallthrough;
        default: /* FIELD_ANY case */
                height2 = btv->crop[!!fh->do_crop].rect.height >> 1;
                field = (f->fmt.pix.height > height2)
index 9fa388626bae0df1b67ee22c01a0fe6d07b5a876..8e224fc0474d5aad6ec08fb879e7772892b011b3 100644 (file)
@@ -3499,7 +3499,7 @@ static void cx88_card_setup(struct cx88_core *core)
                cx_clear(MO_GP0_IO, 0x00000040);
                msleep(1000);
                cx_set(MO_GP0_IO, 0x00004040);
-               /* FALLTHROUGH */
+               fallthrough;
        case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
        case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
        case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
index e7fd7516787c6d9bf3f2b532f2f724d69db44ddf..8cffdacf600792ee4fa301cdea4a7c79de6026b5 100644 (file)
@@ -1385,7 +1385,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,
                request_module("rtc-isl1208");
                core->i2c_rtc = i2c_new_client_device(&core->i2c_adap, &rtc_info);
        }
-               /* fall-through */
+               fallthrough;
        case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
                request_module("ir-kbd-i2c");
        }
index c1937c33c33d65dd09ee6c42f6ff0735e5c9d544..ce449c941171d984b3c15b073016dfaddbadf2f5 100644 (file)
@@ -7812,7 +7812,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
                                dev->name, saa7134_boards[dev->board].name);
                        break;
                }
-               /* fall-through */
+               fallthrough;
        case SAA7134_BOARD_VIDEOMATE_DVBT_300:
        case SAA7134_BOARD_ASUS_EUROPA2_HYBRID:
        case SAA7134_BOARD_ASUS_EUROPA_HYBRID:
@@ -7870,7 +7870,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
                break;
        case SAA7134_BOARD_HAUPPAUGE_HVR1110:
                hauppauge_eeprom(dev, dev->eedata+0x80);
-               /* fall-through */
+               fallthrough;
        case SAA7134_BOARD_PINNACLE_PCTV_310i:
        case SAA7134_BOARD_KWORLD_DVBT_210:
        case SAA7134_BOARD_TEVION_DVBT_220RF:
index c6e0090f27e81f3fccc1104f47cab36f7a51db47..d497afc7e7b78907956b64bc36806fb7ca83f42a 100644 (file)
@@ -503,7 +503,7 @@ static int solo_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        default:
                dev_warn(&pdev->dev, "Invalid chip_id 0x%02x, assuming 4 ch\n",
                         chip_id);
-               /* fall through */
+               fallthrough;
        case 5:
                solo_dev->nr_chans = 4;
                solo_dev->nr_ext = 1;
index f86f12fa63501f3ca827f849b91bb64dbe6c68e5..7db785e9c997913010a29a769b68f7d30bd847b1 100644 (file)
@@ -183,7 +183,7 @@ int solo_i2c_isr(struct solo_dev *solo_dev)
                }
 
                solo_dev->i2c_state = IIC_STATE_WRITE;
-               /* fall through */
+               fallthrough;
        case IIC_STATE_WRITE:
                ret = solo_i2c_handle_write(solo_dev);
                break;
index b021604eceaad1465501dab3941d28feeb9f5cad..bf75927bac4e7049fd2226e642587233d37983e0 100644 (file)
@@ -1101,7 +1101,7 @@ static int coda_start_encoding(struct coda_ctx *ctx)
                break;
        case CODA_960:
                coda_write(dev, 0, CODA9_GDI_WPROT_RGN_EN);
-               /* fallthrough */
+               fallthrough;
        case CODA_HX4:
        case CODA_7541:
                coda_write(dev, CODA7_STREAM_BUF_DYNALLOC_EN |
@@ -1141,7 +1141,7 @@ static int coda_start_encoding(struct coda_ctx *ctx)
                                 CODA7_PICHEIGHT_MASK) << CODA_PICHEIGHT_OFFSET;
                        break;
                }
-               /* fallthrough */
+               fallthrough;
        case CODA_960:
                value = (q_data_src->rect.width & CODA7_PICWIDTH_MASK)
                        << CODA7_PICWIDTH_OFFSET;
index 3ab3d976d8cad49990a00a4cb0c9a64d2a82f91c..823a4d7578d6bb366de3b4928b09e8cfa0d0dc05 100644 (file)
@@ -808,7 +808,7 @@ static int coda_s_fmt(struct coda_ctx *ctx, struct v4l2_format *f,
                        ctx->tiled_map_type = GDI_TILED_FRAME_MB_RASTER_MAP;
                        break;
                }
-               /* else fall through */
+               fallthrough;
        case V4L2_PIX_FMT_YUV420:
        case V4L2_PIX_FMT_YVU420:
        case V4L2_PIX_FMT_YUV422P:
@@ -1015,7 +1015,7 @@ static int coda_g_selection(struct file *file, void *fh,
        case V4L2_SEL_TGT_CROP_DEFAULT:
        case V4L2_SEL_TGT_CROP_BOUNDS:
                rsel = &r;
-               /* fallthrough */
+               fallthrough;
        case V4L2_SEL_TGT_CROP:
                if (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT ||
                    ctx->inst_type == CODA_INST_DECODER)
@@ -1024,7 +1024,7 @@ static int coda_g_selection(struct file *file, void *fh,
        case V4L2_SEL_TGT_COMPOSE_BOUNDS:
        case V4L2_SEL_TGT_COMPOSE_PADDED:
                rsel = &r;
-               /* fallthrough */
+               fallthrough;
        case V4L2_SEL_TGT_COMPOSE:
        case V4L2_SEL_TGT_COMPOSE_DEFAULT:
                if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
@@ -1074,7 +1074,7 @@ static int coda_s_selection(struct file *file, void *fh,
 
                        return 0;
                }
-               /* else fall through */
+               fallthrough;
        case V4L2_SEL_TGT_NATIVE_SIZE:
        case V4L2_SEL_TGT_COMPOSE:
                return coda_g_selection(file, fh, s);
@@ -2628,7 +2628,7 @@ static int coda_open(struct file *file)
                 */
                if (enable_bwb || ctx->inst_type == CODA_INST_ENCODER)
                        ctx->frame_mem_ctrl = CODA9_FRAME_ENABLE_BWB;
-               /* fallthrough */
+               fallthrough;
        case CODA_HX4:
        case CODA_7541:
                ctx->reg_idx = 0;
index e7a4b06e6dfe6a61542761f4978ebfa08eac2ae4..4fbf5506da978752101384b72b506ab365a5e5d0 100644 (file)
@@ -1279,7 +1279,7 @@ static int fimc_cap_g_selection(struct file *file, void *fh,
        case V4L2_SEL_TGT_COMPOSE_DEFAULT:
        case V4L2_SEL_TGT_COMPOSE_BOUNDS:
                f = &ctx->d_frame;
-               /* fall through */
+               fallthrough;
        case V4L2_SEL_TGT_CROP_BOUNDS:
        case V4L2_SEL_TGT_CROP_DEFAULT:
                s->r.left = 0;
@@ -1290,7 +1290,7 @@ static int fimc_cap_g_selection(struct file *file, void *fh,
 
        case V4L2_SEL_TGT_COMPOSE:
                f = &ctx->d_frame;
-               /* fall through */
+               fallthrough;
        case V4L2_SEL_TGT_CROP:
                s->r.left = f->offs_h;
                s->r.top = f->offs_v;
@@ -1601,7 +1601,7 @@ static int fimc_subdev_get_selection(struct v4l2_subdev *sd,
        switch (sel->target) {
        case V4L2_SEL_TGT_COMPOSE_BOUNDS:
                f = &ctx->d_frame;
-               /* fall through */
+               fallthrough;
        case V4L2_SEL_TGT_CROP_BOUNDS:
                r->width = f->o_width;
                r->height = f->o_height;
index 5ce2bdebd424aaaa3c2ce5ba7438a3e0d3a29c36..c9e9ed7eb143748410a85075c46b4b430696b4fc 100644 (file)
@@ -710,7 +710,7 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc,
                break;
        case FIMC_BUS_TYPE_LCD_WRITEBACK_A:
                cfg |= FIMC_REG_CIGCTRL_CAMIF_SELWB;
-               /* fall through */
+               fallthrough;
        case FIMC_BUS_TYPE_ISP_WRITEBACK:
                if (fimc->variant->has_isp_wb)
                        cfg |= FIMC_REG_CIGCTRL_CAMIF_SELWB;
index 6df279665c9dcba82c5516bece1a65966fbdc7ee..ae74d8f72d297eadda0e6500e426ec93148e59e9 100644 (file)
@@ -93,7 +93,7 @@ static void fimc_pipeline_prepare(struct fimc_pipeline *p,
                switch (sd->grp_id) {
                case GRP_ID_SENSOR:
                        sensor = sd;
-                       /* fall through */
+                       fallthrough;
                case GRP_ID_FIMC_IS_SENSOR:
                        p->subdevs[IDX_SENSOR] = sd;
                        break;
index f919cb401b40c7e565d925564f5737e469db9520..c012fd2e1d291f9931722cf4d955838314e818df 100644 (file)
@@ -389,7 +389,7 @@ static int mcam_alloc_dma_bufs(struct mcam_camera *cam, int loadtime)
                dma_free_coherent(cam->dev, cam->dma_buf_size,
                                cam->dma_bufs[0], cam->dma_handles[0]);
                cam->nbufs = 0;
-               /* fall-through */
+               fallthrough;
        case 0:
                cam_err(cam, "Insufficient DMA buffers, cannot operate\n");
                return -ENOMEM;
index 1ac9aef70dff222d3c5f137885dd650a9d229c17..8811d6dd4ee747fc76374b9da7a832ba1bed7e94 100644 (file)
@@ -703,7 +703,7 @@ isp_video_set_format(struct file *file, void *fh, struct v4l2_format *format)
                 * requested.
                 */
                format->fmt.pix.field = V4L2_FIELD_INTERLACED_TB;
-               /* Fall-through */
+               fallthrough;
        case V4L2_FIELD_INTERLACED_TB:
        case V4L2_FIELD_INTERLACED_BT:
                /* Interlaced orders are only supported at the CCDC output. */
index fbefc1634820d505fe69a39393fbc736445eed41..a88367af1472a2a7e3332b7a7718447864300644 100644 (file)
@@ -1072,7 +1072,7 @@ static int vdec_stop_capture(struct venus_inst *inst)
        switch (inst->codec_state) {
        case VENUS_DEC_STATE_DECODING:
                ret = hfi_session_flush(inst, HFI_FLUSH_ALL, true);
-               /* fallthrough */
+               fallthrough;
        case VENUS_DEC_STATE_DRAIN:
                vdec_cancel_dst_buffers(inst);
                inst->codec_state = VENUS_DEC_STATE_STOPPED;
index f7d71a6a7970093b180fe483d1f775afe5f2a85b..4a633ad0e8fa6fe0a16cde545139cfc9a41e1d95 100644 (file)
@@ -405,7 +405,7 @@ static int ceu_hw_config(struct ceu_device *ceudev)
        /* Non-swapped planar image capture mode. */
        case V4L2_PIX_FMT_NV16:
                cdocr   |= CEU_CDOCR_NO_DOWSAMPLE;
-               /* fall-through */
+               fallthrough;
        case V4L2_PIX_FMT_NV12:
                if (mbus_fmt->swapped)
                        camcr = mbus_fmt->fmt_order_swap;
@@ -419,7 +419,7 @@ static int ceu_hw_config(struct ceu_device *ceudev)
        /* Swapped planar image capture mode. */
        case V4L2_PIX_FMT_NV61:
                cdocr   |= CEU_CDOCR_NO_DOWSAMPLE;
-               /* fall-through */
+               fallthrough;
        case V4L2_PIX_FMT_NV21:
                if (mbus_fmt->swapped)
                        camcr = mbus_fmt->fmt_order;
index 7f3aee495ed3282aac9446908718441590f5b682..6afa7c3464ab2be6711c49cc8fda9caef579e3e7 100644 (file)
@@ -1157,7 +1157,7 @@ static int si4713_s_ctrl(struct v4l2_ctrl *ctrl)
                         * V4L2_CID_TUNE_POWER_LEVEL. */
                        if (force)
                                break;
-                       /* fall through */
+                       fallthrough;
                case V4L2_CID_TUNE_POWER_LEVEL:
                        ret = si4713_tx_tune_power(sdev,
                                sdev->tune_pwr_level->val, sdev->tune_ant_cap->val);
index 566c2816d5bef50c9bf3cb13fcb48a7628f68c92..b5b993b33b80c00c0f3d9d0e3e2f43ab890df788 100644 (file)
@@ -101,7 +101,7 @@ static void process_ir_data(struct iguanair *ir, unsigned len)
                        break;
                case CMD_TX_OVERFLOW:
                        ir->tx_overflow = true;
-                       /* fall through */
+                       fallthrough;
                case CMD_RECEIVER_OFF:
                case CMD_RECEIVER_ON:
                case CMD_SEND:
index e4a8d3a5eecddbaf3f08cc619dc85666f673af18..3281caf84fb3253d5836aac69963b8d3dc492880 100644 (file)
@@ -1310,7 +1310,7 @@ static int vicodec_subscribe_event(struct v4l2_fh *fh,
        case V4L2_EVENT_SOURCE_CHANGE:
                if (ctx->is_enc)
                        return -EINVAL;
-               /* fall through */
+               fallthrough;
        case V4L2_EVENT_EOS:
                if (ctx->is_stateless)
                        return -EINVAL;
index acc98445a1fabdea5258b5a2618393c63cc1c7b8..a141369a7a63be28f8c7f609a548779a22db334b 100644 (file)
@@ -298,7 +298,7 @@ void vivid_vbi_gen_sliced(struct vivid_vbi_gen_data *vbi,
        switch (frame) {
        case 0:
                vivid_vbi_gen_set_time_of_day(vbi->time_of_day_packet);
-               /* fall through */
+               fallthrough;
        case 1 ... 7:
                data1->data[0] = vbi->time_of_day_packet[frame * 2];
                data1->data[1] = vbi->time_of_day_packet[frame * 2 + 1];
index b7b5b33b11f4ef99e769b84fa2c83e4d7744566e..eaa3bbc903d7eb3dac799302727db6586dd39dc4 100644 (file)
@@ -250,7 +250,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
                dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. Using 6000 kHz.\n",
                         bandwidth);
                bandwidth = 6000;
-               /* fallthrough */
+               fallthrough;
        case 6000:
                regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW6M;
                break;
index 471aaf71fdef8f71fd8100e0e5e08c4a73296a66..f0371d004b36dcf3b3f2fc3b434d235cf632e2b8 100644 (file)
@@ -948,7 +948,7 @@ static int tda18271_set_params(struct dvb_frontend *fe)
                break;
        case SYS_DVBC_ANNEX_B:
                bw = 6000000;
-               /* fall through */
+               fallthrough;
        case SYS_DVBC_ANNEX_A:
        case SYS_DVBC_ANNEX_C:
                if (bw <= 6000000) {
index c427b9031e420ff3993774ec7b5ff6245e6fd490..c70b3cef3176c64230d293b092c286f0befc50e1 100644 (file)
@@ -43,7 +43,7 @@ static int af9015_ctrl_msg(struct dvb_usb_device *d, struct req_t *req)
        case READ_I2C:
                write = 0;
                state->buf[2] |= 0x01; /* set I2C direction */
-               /* fall through */
+               fallthrough;
        case WRITE_I2C:
                state->buf[0] = READ_WRITE_I2C;
                break;
index b7ca236174f3eac2552720ef0400a5227941b7fb..0c434259c36f19034247f90d16151692db4eb356 100644 (file)
@@ -41,7 +41,7 @@ static int gl861_ctrl_msg(struct dvb_usb_device *d, u8 request, u16 value,
        switch (request) {
        case CMD_WRITE:
                memcpy(ctx->buf, data, size);
-               /* Fall through */
+               fallthrough;
        case CMD_WRITE_SHORT:
                pipe = usb_sndctrlpipe(d->udev, 0);
                requesttype = USB_TYPE_VENDOR | USB_DIR_OUT;
index 8a3c0eeed95962bd508462c6a97024d8e79e9ddb..5a7a9522d46dab2224427cf670289b8891233b03 100644 (file)
@@ -687,7 +687,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold)
                                cold = 0;
                                break;
                        }
-                       /* fall through */
+                       fallthrough;
                case TUNER_LG:
                        fw_lme = fw_lg;
                        ret = request_firmware(&fw, fw_lme, &udev->dev);
@@ -710,7 +710,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold)
                                cold = 0;
                                break;
                        }
-                       /* fall through */
+                       fallthrough;
                case TUNER_LG:
                        fw_lme = fw_c_lg;
                        ret = request_firmware(&fw, fw_lme, &udev->dev);
@@ -718,7 +718,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold)
                                st->dvb_usb_lme2510_firmware = TUNER_LG;
                                break;
                        }
-                       /* fall through */
+                       fallthrough;
                case TUNER_S0194:
                        fw_lme = fw_c_s0194;
                        ret = request_firmware(&fw, fw_lme, &udev->dev);
@@ -1018,7 +1018,7 @@ static int dm04_lme2510_frontend_attach(struct dvb_usb_adapter *adap)
                        }
                        break;
                }
-               /* fall through */
+               fallthrough;
        case 0x22f0:
                st->i2c_gate = 5;
                adap->fe[0] = dvb_attach(m88rs2000_attach,
index 0b7dda99e410bf036325601826908626784fffc2..ef489c566b75e714fbf00cd8ee369a92dcb1f32e 100644 (file)
@@ -632,7 +632,7 @@ int mxl111sf_set_gpio(struct mxl111sf_state *state, int gpio, int val)
        default:
                mxl_printk(KERN_ERR,
                           "gpio_port_expander undefined, assuming PCA9534");
-               /* fall-thru */
+               fallthrough;
        case mxl111sf_PCA9534:
                return pca9534_set_gpio(state, gpio, val);
        case mxl111sf_gpio_hw:
@@ -693,7 +693,7 @@ int mxl111sf_init_port_expander(struct mxl111sf_state *state)
        default:
                mxl_printk(KERN_ERR,
                           "gpio_port_expander undefined, assuming PCA9534");
-               /* fall-thru */
+               fallthrough;
        case mxl111sf_PCA9534:
                return pca9534_init_port_expander(state);
        case mxl111sf_gpio_hw:
index 6833b5bfe29370f01e026a1d0bb83f1150f21b35..dc968fd5ace909d9bec96e82c81fc7026482bea5 100644 (file)
@@ -362,13 +362,13 @@ static int snd_em28xx_capture_trigger(struct snd_pcm_substream *substream,
                return -ENODEV;
 
        switch (cmd) {
-       case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: /* fall through */
-       case SNDRV_PCM_TRIGGER_RESUME: /* fall through */
+       case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+       case SNDRV_PCM_TRIGGER_RESUME:
        case SNDRV_PCM_TRIGGER_START:
                atomic_set(&dev->adev.stream_started, 1);
                break;
-       case SNDRV_PCM_TRIGGER_PAUSE_PUSH: /* fall through */
-       case SNDRV_PCM_TRIGGER_SUSPEND: /* fall through */
+       case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+       case SNDRV_PCM_TRIGGER_SUSPEND:
        case SNDRV_PCM_TRIGGER_STOP:
                atomic_set(&dev->adev.stream_started, 0);
                break;
index 153a0c3e3da6443f69144994bffcc483280a0e49..f1767be9d8685e0eb76b913d413d3491cc579b76 100644 (file)
@@ -643,7 +643,7 @@ void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length)
                        case 0xD8:
                                if (go->format == V4L2_PIX_FMT_MJPEG)
                                        vb = frame_boundary(go, vb);
-                               /* fall through */
+                               fallthrough;
                        default:
                                store_byte(vb, 0xFF);
                                store_byte(vb, buf[i]);
index 464aa61cd914253ee52cce447c2841e6f67ba59e..3553788e85427c71ec697f2bd866338c3e721da5 100644 (file)
@@ -510,7 +510,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev)
        switch (gspca_dev->pixfmt.width) {
        case 160:
                data[9] |= 0x04;  /* reg 8, 2:1 scale down from 320 */
-               /* fall through */
+               fallthrough;
        case 320:
        default:
                data[3] = 0x28;                    /* reg 2, H size/8 */
@@ -520,7 +520,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev)
                break;
        case 176:
                data[9] |= 0x04;  /* reg 8, 2:1 scale down from 352 */
-               /* fall through */
+               fallthrough;
        case 352:
                data[3] = 0x2c;                    /* reg 2, H size/8 */
                data[4] = 0x48;                    /* reg 3, V size/4 */
@@ -607,10 +607,10 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
        switch (gspca_dev->pixfmt.width) {
        case 160:
                data[9] |= 0x0c;  /* reg 8, 4:1 scale down */
-               /* fall through */
+               fallthrough;
        case 320:
                data[9] |= 0x04;  /* reg 8, 2:1 scale down */
-               /* fall through */
+               fallthrough;
        case 640:
        default:
                data[3] = 0x50;  /* reg 2, H size/8 */
@@ -627,7 +627,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
 
        case 176:
                data[9] |= 0x04;  /* reg 8, 2:1 scale down */
-               /* fall through */
+               fallthrough;
        case 352:
                data[3] = 0x2c;  /* reg 2, H size */
                data[4] = 0x48;  /* reg 3, V size */
index 880f569bda30f2aac3f64f8e45e66d69b0384864..0f5f2464ac7a73b97871220074e51971a171ea52 100644 (file)
@@ -2019,7 +2019,7 @@ static int sd_init_controls(struct gspca_dev *gspca_dev)
                        V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
                gspca_dev->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
                        V4L2_CID_GAIN, 0, 253, 1, 128);
-               /* fall through */
+               fallthrough;
        case Cvideopro:
        case DvcV6:
        case Kritter:
index 0afe70a3f9a2de198b1d53d2b9abef496798f689..cd6776c3163b1b71f47af0f0d1ad4153e83b769e 100644 (file)
@@ -2004,7 +2004,7 @@ static void reg_w(struct sd *sd, u16 index, u16 value)
                break;
        case BRIDGE_OVFX2:
                req = 0x0a;
-               /* fall through */
+               fallthrough;
        case BRIDGE_W9968CF:
                gspca_dbg(gspca_dev, D_USBO, "SET %02x %04x %04x\n",
                          req, value, index);
@@ -3528,7 +3528,7 @@ static void ov511_mode_init_regs(struct sd *sd)
        case SEN_OV76BE:
                if (sd->gspca_dev.pixfmt.width == 320)
                        interlaced = 1;
-               /* Fall through */
+               fallthrough;
        case SEN_OV6630:
        case SEN_OV7610:
        case SEN_OV7670:
@@ -3541,7 +3541,7 @@ static void ov511_mode_init_regs(struct sd *sd)
                                break;
                        }
                        /* For 640x480 case */
-                       /* fall through */
+                       fallthrough;
                default:
 /*             case 20: */
 /*             case 15: */
index 2a6d0a1265a705ec691bd42de18a22bbee4c4c32..bfd194c61819af23ef039493607bd753bfbcb3a2 100644 (file)
@@ -1637,7 +1637,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
                break;
        case SENSOR_HV7131R:
                sd->i2c_intf = 0x81;                    /* i2c 400 Kb/s */
-               /* fall through */
+               fallthrough;
        default:
                cam->cam_mode = vga_mode;
                cam->nmodes = ARRAY_SIZE(vga_mode);
index f4a4222f0d2e4f9fcc0ef26b6ea07f0b0106d616..ace3da40006e74ccb36082dddd48f71dc0116d89 100644 (file)
@@ -551,7 +551,7 @@ static void init_ctl_reg(struct gspca_dev *gspca_dev)
        case BRIDGE_SPCA504:
        case BRIDGE_SPCA504C:
                pollreg = 0;
-               /* fall through */
+               fallthrough;
        default:
 /*     case BRIDGE_SPCA533: */
 /*     case BRIDGE_SPCA504B: */
@@ -634,7 +634,7 @@ static int sd_init(struct gspca_dev *gspca_dev)
                reg_w_riv(gspca_dev, 0x00, 0x2000, 0x00);
                reg_w_riv(gspca_dev, 0x00, 0x2301, 0x13);
                reg_w_riv(gspca_dev, 0x00, 0x2306, 0x00);
-               /* fall through */
+               fallthrough;
        case BRIDGE_SPCA533:
                spca504B_PollingDataReady(gspca_dev);
                spca50x_GetFirmware(gspca_dev);
index c579b100f066d29403c50c946d83e681dfc31f3f..cc87c24dd24c9531b56af2f44dc7afa05ed3e6cf 100644 (file)
@@ -1409,7 +1409,7 @@ static int cit_restart_stream(struct gspca_dev *gspca_dev)
        case CIT_MODEL0:
        case CIT_MODEL1:
                cit_write_reg(gspca_dev, 0x0001, 0x0114);
-               /* Fall through */
+               fallthrough;
        case CIT_MODEL2:
        case CIT_MODEL4:
                cit_write_reg(gspca_dev, 0x00c0, 0x010c); /* Go! */
@@ -2725,7 +2725,7 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
                break;
        case CIT_MODEL2:
                v4l2_ctrl_grab(sd->lighting, false);
-               /* Fall through! */
+               fallthrough;
        case CIT_MODEL4:
                cit_model2_Packet1(gspca_dev, 0x0030, 0x0004);
 
index 15a2449d536fde1bcf69ed3a7940c3cd0eac61e3..aa285d5d6c0d9a88c830731627c6088f56336fb3 100644 (file)
@@ -6766,7 +6766,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
        case SENSOR_HV7131R:
        case SENSOR_TAS5130C:
                reg_r(gspca_dev, 0x0008);
-               /* fall through */
+               fallthrough;
        case SENSOR_PO2030:
                reg_w(gspca_dev, 0x03, 0x0008);
                break;
@@ -6815,7 +6815,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
        case SENSOR_TAS5130C:
                reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */
                reg_w(gspca_dev, 0x15, 0x01ae);
-               /* fall through */
+               fallthrough;
        case SENSOR_PAS202B:
        case SENSOR_PO2030:
 /*             reg_w(gspca_dev, 0x40, ZC3XX_R117_GGAIN); in win traces */
index 2f135d533af6f666aefdc295262838d6c034b4b9..71b719d363a5df71a65b34b103b968a5b3b8cb68 100644 (file)
@@ -554,7 +554,7 @@ static int pwc_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
                if (!DEVICE_USE_CODEC3(pdev->type))
                        break;
                /* For CODEC3 where autogain also controls expo */
-               /* fall through */
+               fallthrough;
        case V4L2_CID_EXPOSURE_AUTO:
                if (pdev->exposure_valid && time_before(jiffies,
                                pdev->last_exposure_update + HZ / 4)) {
index 9ba3a2ae36e54f09f2b6593e3807877a10ab93c1..df4c5dcba39cd7a60205f80a6f90f10e923da3fd 100644 (file)
@@ -430,7 +430,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
                break;
        case SMS_UNKNOWN_TYPE:
                pr_err("Unspecified sms device type!\n");
-               /* fall-thru */
+               fallthrough;
        default:
                dev->buffer_size = USB2_BUFFER_SIZE;
                dev->response_alignment = align;
index c26a0ff60a646197af2525018600bcfea23194ed..3a2df36ef1db1b127f6720b0d3d1c0a84ed16245 100644 (file)
@@ -272,13 +272,13 @@ static int snd_tm6000_card_trigger(struct snd_pcm_substream *substream, int cmd)
        int err = 0;
 
        switch (cmd) {
-       case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: /* fall through */
-       case SNDRV_PCM_TRIGGER_RESUME: /* fall through */
+       case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+       case SNDRV_PCM_TRIGGER_RESUME:
        case SNDRV_PCM_TRIGGER_START:
                atomic_set(&core->stream_started, 1);
                break;
-       case SNDRV_PCM_TRIGGER_PAUSE_PUSH: /* fall through */
-       case SNDRV_PCM_TRIGGER_SUSPEND: /* fall through */
+       case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+       case SNDRV_PCM_TRIGGER_SUSPEND:
        case SNDRV_PCM_TRIGGER_STOP:
                atomic_set(&core->stream_started, 0);
                break;
index a65d5353a441e00c24093688bd3289f62d9ef5e3..6249e26e87883a4968d508a7291692b2d4a2b90b 100644 (file)
@@ -1509,11 +1509,11 @@ static void uvc_video_complete(struct urb *urb)
        default:
                uvc_printk(KERN_WARNING, "Non-zero status (%d) in video "
                        "completion handler.\n", urb->status);
-               /* fall through */
+               fallthrough;
        case -ENOENT:           /* usb_poison_urb() called. */
                if (stream->frozen)
                        return;
-               /* fall through */
+               fallthrough;
        case -ECONNRESET:       /* usb_unlink_urb() called. */
        case -ESHUTDOWN:        /* The endpoint is being disabled. */
                uvc_queue_cancel(queue, urb->status == -ESHUTDOWN);