Skip to content

Commit bd490f8

Browse files
GustavoARSilvaWim Van Sebroeck
authored andcommitted
watchdog: 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/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/20200707171121.GA13472@embeddedor Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 5edc8c6 commit bd490f8

38 files changed

+39
-40
lines changed

drivers/watchdog/advantechwdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
177177
if (advwdt_set_heartbeat(new_timeout))
178178
return -EINVAL;
179179
advwdt_ping();
180-
/* fall through */
180+
fallthrough;
181181
case WDIOC_GETTIMEOUT:
182182
return put_user(timeout, p);
183183
default:

drivers/watchdog/alim1535_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static long ali_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
220220
return -EINVAL;
221221
ali_keepalive();
222222
}
223-
/* fall through */
223+
fallthrough;
224224
case WDIOC_GETTIMEOUT:
225225
return put_user(timeout, p);
226226
default:

drivers/watchdog/alim7101_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
279279
timeout = new_timeout;
280280
wdt_keepalive();
281281
}
282-
/* Fall through */
282+
fallthrough;
283283
case WDIOC_GETTIMEOUT:
284284
return put_user(timeout, p);
285285
default:

drivers/watchdog/ar7_wdt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ static long ar7_wdt_ioctl(struct file *file,
235235
ar7_wdt_update_margin(new_margin);
236236
ar7_wdt_kick(1);
237237
spin_unlock(&wdt_lock);
238-
/* Fall through */
239-
238+
fallthrough;
240239
case WDIOC_GETTIMEOUT:
241240
if (put_user(margin, (int *)arg))
242241
return -EFAULT;

drivers/watchdog/ath79_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ static long ath79_wdt_ioctl(struct file *file, unsigned int cmd,
215215
err = ath79_wdt_set_timeout(t);
216216
if (err)
217217
break;
218+
fallthrough;
218219

219-
/* fallthrough */
220220
case WDIOC_GETTIMEOUT:
221221
err = put_user(timeout, p);
222222
break;

drivers/watchdog/eurotechwdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static long eurwdt_ioctl(struct file *file,
286286
eurwdt_timeout = time;
287287
eurwdt_set_timeout(time);
288288
spin_unlock(&eurwdt_lock);
289-
/* fall through */
289+
fallthrough;
290290

291291
case WDIOC_GETTIMEOUT:
292292
return put_user(eurwdt_timeout, p);

drivers/watchdog/f71808e_wdt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
612612

613613
if (new_options & WDIOS_ENABLECARD)
614614
return watchdog_start();
615-
/* fall through */
615+
fallthrough;
616616

617617
case WDIOC_KEEPALIVE:
618618
watchdog_keepalive();
@@ -626,7 +626,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
626626
return -EINVAL;
627627

628628
watchdog_keepalive();
629-
/* fall through */
629+
fallthrough;
630630

631631
case WDIOC_GETTIMEOUT:
632632
return put_user(watchdog.timeout, uarg.i);

drivers/watchdog/gef_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static long gef_wdt_ioctl(struct file *file, unsigned int cmd,
201201
if (get_user(timeout, (int __user *)argp))
202202
return -EFAULT;
203203
gef_wdt_set_timeout(timeout);
204-
/* Fall through */
204+
fallthrough;
205205

206206
case WDIOC_GETTIMEOUT:
207207
if (put_user(gef_wdt_timeout, (int __user *)argp))

drivers/watchdog/geodewdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static long geodewdt_ioctl(struct file *file, unsigned int cmd,
185185

186186
if (geodewdt_set_heartbeat(interval))
187187
return -EINVAL;
188-
/* Fall through */
188+
fallthrough;
189189
case WDIOC_GETTIMEOUT:
190190
return put_user(timeout, p);
191191

drivers/watchdog/ib700wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static long ibwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
214214
if (ibwdt_set_heartbeat(new_margin))
215215
return -EINVAL;
216216
ibwdt_ping();
217-
/* fall through */
217+
fallthrough;
218218

219219
case WDIOC_GETTIMEOUT:
220220
return put_user(timeout, p);

0 commit comments

Comments
 (0)