diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2020-07-25 00:10:14 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-08-29 08:35:27 +0200 |
commit | 1771e9fb67e2d6df29acb0ee8349c3833a212754 (patch) | |
tree | ef45b443e5a39158843fb0da149ef41860f505da /drivers/media/platform | |
parent | d7a81a5b073135358a9b98ad0be263b5f327ebcb (diff) | |
download | linux-1771e9fb67e2d6df29acb0ee8349c3833a212754.tar.gz |
media: Use fallthrough pseudo-keyword
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>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/coda/coda-bit.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 10 | ||||
-rw-r--r-- | drivers/media/platform/exynos4-is/fimc-capture.c | 6 | ||||
-rw-r--r-- | drivers/media/platform/exynos4-is/fimc-reg.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/exynos4-is/media-dev.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/marvell-ccic/mcam-core.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/omap3isp/ispvideo.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/qcom/venus/vdec.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/renesas-ceu.c | 4 |
9 files changed, 17 insertions, 17 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index b021604eceaa..bf75927bac4e 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -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; diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 3ab3d976d8ca..823a4d7578d6 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -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; diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index e7a4b06e6dfe..4fbf5506da97 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -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; diff --git a/drivers/media/platform/exynos4-is/fimc-reg.c b/drivers/media/platform/exynos4-is/fimc-reg.c index 5ce2bdebd424..c9e9ed7eb143 100644 --- a/drivers/media/platform/exynos4-is/fimc-reg.c +++ b/drivers/media/platform/exynos4-is/fimc-reg.c @@ -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; diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 6df279665c9d..ae74d8f72d29 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -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; diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c index f919cb401b40..c012fd2e1d29 100644 --- a/drivers/media/platform/marvell-ccic/mcam-core.c +++ b/drivers/media/platform/marvell-ccic/mcam-core.c @@ -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; diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index 1ac9aef70dff..8811d6dd4ee7 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -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. */ diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index fbefc1634820..a88367af1472 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -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; diff --git a/drivers/media/platform/renesas-ceu.c b/drivers/media/platform/renesas-ceu.c index f7d71a6a7970..4a633ad0e8fa 100644 --- a/drivers/media/platform/renesas-ceu.c +++ b/drivers/media/platform/renesas-ceu.c @@ -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; |