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/i2c | |
parent | media: staging: rkisp1: uapi: remove __packed (diff) | |
download | linux-1771e9fb67e2d6df29acb0ee8349c3833a212754.tar.xz linux-1771e9fb67e2d6df29acb0ee8349c3833a212754.zip |
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/i2c')
-rw-r--r-- | drivers/media/i2c/adv7180.c | 2 | ||||
-rw-r--r-- | drivers/media/i2c/adv7511-v4l2.c | 4 | ||||
-rw-r--r-- | drivers/media/i2c/msp3400-kthreads.c | 2 | ||||
-rw-r--r-- | drivers/media/i2c/ov5640.c | 2 | ||||
-rw-r--r-- | drivers/media/i2c/ov6650.c | 4 | ||||
-rw-r--r-- | drivers/media/i2c/ov9640.c | 2 | ||||
-rw-r--r-- | drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c | 2 | ||||
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 6 | ||||
-rw-r--r-- | drivers/media/i2c/tda1997x.c | 10 | ||||
-rw-r--r-- | drivers/media/i2c/tvp5150.c | 2 |
10 files changed, 18 insertions, 18 deletions
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index e8744efe3cf0..4498d14d3429 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -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; diff --git a/drivers/media/i2c/adv7511-v4l2.c b/drivers/media/i2c/adv7511-v4l2.c index 62763ec4cd07..a3161d709015 100644 --- a/drivers/media/i2c/adv7511-v4l2.c +++ b/drivers/media/i2c/adv7511-v4l2.c @@ -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); diff --git a/drivers/media/i2c/msp3400-kthreads.c b/drivers/media/i2c/msp3400-kthreads.c index d3b0d1c18efd..52e506f86de5 100644 --- a/drivers/media/i2c/msp3400-kthreads.c +++ b/drivers/media/i2c/msp3400-kthreads.c @@ -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; diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 2fe4a7ac0592..ccdabc7948a7 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -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: diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index 48493af81198..d73f9f540932 100644 --- a/drivers/media/i2c/ov6650.c +++ b/drivers/media/i2c/ov6650.c @@ -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; } diff --git a/drivers/media/i2c/ov9640.c b/drivers/media/i2c/ov9640.c index fbd5d7b75811..e2a25240fc85 100644 --- a/drivers/media/i2c/ov9640.c +++ b/drivers/media/i2c/ov9640.c @@ -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; diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c b/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c index 71cf68a95bb2..141ad0ba7f5a 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c @@ -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: diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 8a9c7de0c056..6fc0680a93d0 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -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: diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 483cc19ed75d..a09bf0a39d05 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -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; diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 1c2050944b92..7d9401219a3a 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -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: |