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/usb | |
parent | d7a81a5b073135358a9b98ad0be263b5f327ebcb (diff) |
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/usb')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/af9015.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/gl861.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/lmedm04.c | 8 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c | 4 | ||||
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-audio.c | 8 | ||||
-rw-r--r-- | drivers/media/usb/go7007/go7007-driver.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/gspca/mr97310a.c | 10 | ||||
-rw-r--r-- | drivers/media/usb/gspca/nw80x.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/gspca/ov519.c | 6 | ||||
-rw-r--r-- | drivers/media/usb/gspca/sn9c20x.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/gspca/sunplus.c | 4 | ||||
-rw-r--r-- | drivers/media/usb/gspca/xirlink_cit.c | 4 | ||||
-rw-r--r-- | drivers/media/usb/gspca/zc3xx.c | 4 | ||||
-rw-r--r-- | drivers/media/usb/pwc/pwc-v4l.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/siano/smsusb.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/tm6000/tm6000-alsa.c | 8 | ||||
-rw-r--r-- | drivers/media/usb/uvc/uvc_video.c | 4 |
17 files changed, 37 insertions, 37 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/af9015.c b/drivers/media/usb/dvb-usb-v2/af9015.c index c427b9031e42..c70b3cef3176 100644 --- a/drivers/media/usb/dvb-usb-v2/af9015.c +++ b/drivers/media/usb/dvb-usb-v2/af9015.c @@ -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; diff --git a/drivers/media/usb/dvb-usb-v2/gl861.c b/drivers/media/usb/dvb-usb-v2/gl861.c index b7ca236174f3..0c434259c36f 100644 --- a/drivers/media/usb/dvb-usb-v2/gl861.c +++ b/drivers/media/usb/dvb-usb-v2/gl861.c @@ -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; diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 8a3c0eeed959..5a7a9522d46d 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -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, diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c b/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c index 0b7dda99e410..ef489c566b75 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c @@ -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: diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c index 6833b5bfe293..dc968fd5ace9 100644 --- a/drivers/media/usb/em28xx/em28xx-audio.c +++ b/drivers/media/usb/em28xx/em28xx-audio.c @@ -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; diff --git a/drivers/media/usb/go7007/go7007-driver.c b/drivers/media/usb/go7007/go7007-driver.c index 153a0c3e3da6..f1767be9d868 100644 --- a/drivers/media/usb/go7007/go7007-driver.c +++ b/drivers/media/usb/go7007/go7007-driver.c @@ -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]); diff --git a/drivers/media/usb/gspca/mr97310a.c b/drivers/media/usb/gspca/mr97310a.c index 464aa61cd914..3553788e8542 100644 --- a/drivers/media/usb/gspca/mr97310a.c +++ b/drivers/media/usb/gspca/mr97310a.c @@ -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 */ diff --git a/drivers/media/usb/gspca/nw80x.c b/drivers/media/usb/gspca/nw80x.c index 880f569bda30..0f5f2464ac7a 100644 --- a/drivers/media/usb/gspca/nw80x.c +++ b/drivers/media/usb/gspca/nw80x.c @@ -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: diff --git a/drivers/media/usb/gspca/ov519.c b/drivers/media/usb/gspca/ov519.c index 0afe70a3f9a2..cd6776c3163b 100644 --- a/drivers/media/usb/gspca/ov519.c +++ b/drivers/media/usb/gspca/ov519.c @@ -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: */ diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c index 2a6d0a1265a7..bfd194c61819 100644 --- a/drivers/media/usb/gspca/sn9c20x.c +++ b/drivers/media/usb/gspca/sn9c20x.c @@ -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); diff --git a/drivers/media/usb/gspca/sunplus.c b/drivers/media/usb/gspca/sunplus.c index f4a4222f0d2e..ace3da40006e 100644 --- a/drivers/media/usb/gspca/sunplus.c +++ b/drivers/media/usb/gspca/sunplus.c @@ -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); diff --git a/drivers/media/usb/gspca/xirlink_cit.c b/drivers/media/usb/gspca/xirlink_cit.c index c579b100f066..cc87c24dd24c 100644 --- a/drivers/media/usb/gspca/xirlink_cit.c +++ b/drivers/media/usb/gspca/xirlink_cit.c @@ -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); diff --git a/drivers/media/usb/gspca/zc3xx.c b/drivers/media/usb/gspca/zc3xx.c index 15a2449d536f..aa285d5d6c0d 100644 --- a/drivers/media/usb/gspca/zc3xx.c +++ b/drivers/media/usb/gspca/zc3xx.c @@ -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 */ diff --git a/drivers/media/usb/pwc/pwc-v4l.c b/drivers/media/usb/pwc/pwc-v4l.c index 2f135d533af6..71b719d363a5 100644 --- a/drivers/media/usb/pwc/pwc-v4l.c +++ b/drivers/media/usb/pwc/pwc-v4l.c @@ -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)) { diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index 9ba3a2ae36e5..df4c5dcba39c 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c @@ -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; diff --git a/drivers/media/usb/tm6000/tm6000-alsa.c b/drivers/media/usb/tm6000/tm6000-alsa.c index c26a0ff60a64..3a2df36ef1db 100644 --- a/drivers/media/usb/tm6000/tm6000-alsa.c +++ b/drivers/media/usb/tm6000/tm6000-alsa.c @@ -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; diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index a65d5353a441..6249e26e8788 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -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); |