watchdog: Use fallthrough pseudo-keyword
PATCH 1/1 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.
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- drivers/watchdog/advantechwdt.c | 2 +- drivers/watchdog/alim1535_wdt.c | 2 +- drivers/watchdog/alim7101_wdt.c | 2 +- drivers/watchdog/ar7_wdt.c | 3 +-- drivers/watchdog/ath79_wdt.c | 2 +- drivers/watchdog/eurotechwdt.c | 2 +- drivers/watchdog/f71808e_wdt.c | 4 ++-- drivers/watchdog/gef_wdt.c | 2 +- drivers/watchdog/geodewdt.c | 2 +- drivers/watchdog/ib700wdt.c | 2 +- drivers/watchdog/it8712f_wdt.c | 2 +- drivers/watchdog/ixp4xx_wdt.c | 2 +- drivers/watchdog/m54xx_wdt.c | 2 +- drivers/watchdog/machzwd.c | 2 +- drivers/watchdog/mv64x60_wdt.c | 2 +- drivers/watchdog/nv_tco.c | 2 +- drivers/watchdog/pc87413_wdt.c | 2 +- drivers/watchdog/pcwd.c | 2 +- drivers/watchdog/pcwd_pci.c | 2 +- drivers/watchdog/pcwd_usb.c | 2 +- drivers/watchdog/rc32434_wdt.c | 2 +- drivers/watchdog/riowd.c | 2 +- drivers/watchdog/sa1100_wdt.c | 2 +- drivers/watchdog/sb_wdog.c | 2 +- drivers/watchdog/sbc60xxwdt.c | 2 +- drivers/watchdog/sbc7240_wdt.c | 2 +- drivers/watchdog/sbc_fitpc2_wdt.c | 2 +- drivers/watchdog/sc520_wdt.c | 2 +- drivers/watchdog/sch311x_wdt.c | 2 +- drivers/watchdog/smsc37b787_wdt.c | 2 +- drivers/watchdog/w83877f_wdt.c | 2 +- drivers/watchdog/w83977f_wdt.c | 2 +- drivers/watchdog/wafer5823wdt.c | 2 +- drivers/watchdog/watchdog_dev.c | 2 +- drivers/watchdog/wdt.c | 2 +- drivers/watchdog/wdt285.c | 2 +- drivers/watchdog/wdt977.c | 2 +- drivers/watchdog/wdt_pci.c | 2 +- 38 files changed, 39 insertions(+), 40 deletions(-)
drivers/watchdog/advantechwdt.c +1 -1
@@ -177,7 +177,7 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (advwdt_set_heartbeat (new_timeout))return -EINVAL ;advwdt_ping (); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :
drivers/watchdog/alim1535_wdt.c +1 -1
@@ -220,7 +220,7 @@ static long ali_ioctl(struct file *file, unsigned int cmd, unsigned long arg)return -EINVAL ;ali_keepalive (); } -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :
drivers/watchdog/alim7101_wdt.c +1 -1
@@ -279,7 +279,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) timeout = new_timeout;wdt_keepalive (); } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :
drivers/watchdog/ar7_wdt.c +1 -2
@@ -235,8 +235,7 @@ static long ar7_wdt_ioctl(struct file *file,ar7_wdt_update_margin (new_margin);ar7_wdt_kick (1 );spin_unlock (&wdt_lock); -/* Fall through */ - + fallthrough;case WDIOC_GETTIMEOUT :if (put_user (margin, (int *)arg))return -EFAULT ;
drivers/watchdog/ath79_wdt.c +1 -1
@@ -215,8 +215,8 @@ static long ath79_wdt_ioctl(struct file *file, unsigned int cmd, err =ath79_wdt_set_timeout (t);if (err)break ; + fallthrough; -/* fallthrough */ case WDIOC_GETTIMEOUT : err =put_user (timeout, p);break ;
drivers/watchdog/eurotechwdt.c +1 -1
@@ -286,7 +286,7 @@ static long eurwdt_ioctl(struct file *file, eurwdt_timeout = time;eurwdt_set_timeout (time);spin_unlock (&eurwdt_lock); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (eurwdt_timeout, p);
drivers/watchdog/f71808e_wdt.c +2 -2
@@ -629,7 +629,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,if (new_options &WDIOS_ENABLECARD )return watchdog_start (); -/* fall through */ + fallthrough;case WDIOC_KEEPALIVE :watchdog_keepalive ();
@@ -643,7 +643,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,return -EINVAL ;watchdog_keepalive (); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (watchdog.timeout, uarg.i);
drivers/watchdog/gef_wdt.c +1 -1
@@ -201,7 +201,7 @@ static long gef_wdt_ioctl(struct file *file, unsigned int cmd,if (get_user (timeout, (int __user *)argp))return -EFAULT ;gef_wdt_set_timeout (timeout); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :if (put_user (gef_wdt_timeout, (int __user *)argp))
drivers/watchdog/geodewdt.c +1 -1
@@ -185,7 +185,7 @@ static long geodewdt_ioctl(struct file *file, unsigned int cmd,if (geodewdt_set_heartbeat (interval))return -EINVAL ; -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);
drivers/watchdog/ib700wdt.c +1 -1
@@ -214,7 +214,7 @@ static long ibwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (ibwdt_set_heartbeat (new_margin))return -EINVAL ;ibwdt_ping (); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);
drivers/watchdog/it8712f_wdt.c +1 -1
@@ -303,7 +303,7 @@ static long it8712f_wdt_ioctl(struct file *file, unsigned int cmd,superio_exit ();it8712f_wdt_ping (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :if (put_user (margin, p))return -EFAULT ;
drivers/watchdog/ixp4xx_wdt.c +1 -1
@@ -136,7 +136,7 @@ static long ixp4xx_wdt_ioctl(struct file *file, unsigned int cmd, heartbeat = time;wdt_enable (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (heartbeat, (int *)arg);
drivers/watchdog/m54xx_wdt.c +1 -1
@@ -155,7 +155,7 @@ static long m54xx_wdt_ioctl(struct file *file, unsigned int cmd, heartbeat = time;wdt_enable (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (heartbeat, (int *)arg);
drivers/watchdog/machzwd.c +1 -1
@@ -171,7 +171,7 @@ static inline void zf_set_timer(unsigned short new, unsigned char n)switch (n) {case WD1 :zf_writew (COUNTER_1 , new); -/* fall through */ + fallthrough;case WD2 :zf_writeb (COUNTER_2 , new >0xff ?0xff : new);default :
drivers/watchdog/mv64x60_wdt.c +1 -1
@@ -222,7 +222,7 @@ static long mv64x60_wdt_ioctl(struct file *file,if (get_user (timeout, (int __user *)argp))return -EFAULT ;mv64x60_wdt_set_timeout (timeout); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :if (put_user (mv64x60_wdt_timeout, (int __user *)argp))
drivers/watchdog/nv_tco.c +1 -1
@@ -250,7 +250,7 @@ static long nv_tco_ioctl(struct file *file, unsigned int cmd,if (tco_timer_set_heartbeat (new_heartbeat))return -EINVAL ;tco_timer_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);default :
drivers/watchdog/pc87413_wdt.c +1 -1
@@ -433,7 +433,7 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd,return -EINVAL ; timeout = new_timeout;pc87413_refresh (); -/* fall through - and return the new timeout... */ + fallthrough;/* and return the new timeout */ case WDIOC_GETTIMEOUT : new_timeout = timeout *60 ;return put_user (new_timeout, uarg.i);
drivers/watchdog/pcwd.c +1 -1
@@ -651,7 +651,7 @@ static long pcwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)return -EINVAL ;pcwd_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, argp);
drivers/watchdog/pcwd_pci.c +1 -1
@@ -542,7 +542,7 @@ static long pcipcwd_ioctl(struct file *file, unsigned int cmd,pcipcwd_keepalive (); } -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);
drivers/watchdog/pcwd_usb.c +1 -1
@@ -452,7 +452,7 @@ static long usb_pcwd_ioctl(struct file *file, unsigned int cmd,usb_pcwd_keepalive (usb_pcwd_device); } -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);
drivers/watchdog/rc32434_wdt.c +1 -1
@@ -230,7 +230,7 @@ static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd,return -EFAULT ;if (rc32434_wdt_set (new_timeout))return -EINVAL ; -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return copy_to_user (argp, &timeout,sizeof (int )) ? -EFAULT :0 ;default :
drivers/watchdog/riowd.c +1 -1
@@ -134,7 +134,7 @@ static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)return -EINVAL ; riowd_timeout = (new_margin +59 ) /60 ;riowd_writereg (p, riowd_timeout,WDTO_INDEX ); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (riowd_timeout *60 , (int __user *)argp);
drivers/watchdog/sa1100_wdt.c +1 -1
@@ -127,7 +127,7 @@ static long sa1100dog_ioctl(struct file *file, unsigned int cmd, pre_margin = oscr_freq * time;writel_relaxed (readl_relaxed (OSCR ) + pre_margin,OSMR3 ); -/*fall through*/ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (pre_margin / oscr_freq, p);
drivers/watchdog/sb_wdog.c +1 -1
@@ -202,7 +202,7 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, timeout = time;sbwdog_set (user_dog, timeout);sbwdog_pet (user_dog); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :/*
drivers/watchdog/sbc60xxwdt.c +1 -1
@@ -265,7 +265,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) timeout = new_timeout;wdt_keepalive (); } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :
drivers/watchdog/sbc7240_wdt.c +1 -1
@@ -195,7 +195,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (wdt_set_timeout (new_timeout))return -EINVAL ; } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, (int __user *)arg);default :
drivers/watchdog/sbc_fitpc2_wdt.c +1 -1
@@ -154,7 +154,7 @@ static long fitpc2_wdt_ioctl(struct file *file, unsigned int cmd, margin = time;wdt_enable (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (margin, (int *)arg);
drivers/watchdog/sc520_wdt.c +1 -1
@@ -321,7 +321,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)wdt_keepalive (); } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :
drivers/watchdog/sch311x_wdt.c +1 -1
@@ -295,7 +295,7 @@ static long sch311x_wdt_ioctl(struct file *file, unsigned int cmd,if (sch311x_wdt_set_heartbeat (new_timeout))return -EINVAL ;sch311x_wdt_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :
drivers/watchdog/smsc37b787_wdt.c +1 -1
@@ -474,7 +474,7 @@ static long wb_smsc_wdt_ioctl(struct file *file,return -EINVAL ; timeout = new_timeout;wb_smsc_wdt_set_timeout (timeout); -/* fall through - and return the new timeout... */ + fallthrough;/* and return the new timeout */ case WDIOC_GETTIMEOUT : new_timeout = timeout;if (unit ==UNIT_MINUTE )
drivers/watchdog/w83877f_wdt.c +1 -1
@@ -289,7 +289,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) timeout = new_timeout;wdt_keepalive (); } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :
drivers/watchdog/w83977f_wdt.c +1 -1
@@ -422,7 +422,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)return -EINVAL ;wdt_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, uarg.i);
drivers/watchdog/wafer5823wdt.c +1 -1
@@ -174,7 +174,7 @@ static long wafwdt_ioctl(struct file *file, unsigned int cmd, timeout = new_timeout;wafwdt_stop ();wafwdt_start (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);
drivers/watchdog/watchdog_dev.c +1 -1
@@ -776,7 +776,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, err =watchdog_ping (wdd);if (err <0 )break ; -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :/* timeout == 0 means that we don't know the timeout */ if (wdd->timeout ==0 ) {
drivers/watchdog/wdt.c +1 -1
@@ -389,7 +389,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (wdt_set_heartbeat (new_heartbeat))return -EINVAL ;wdt_ping (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);default :
drivers/watchdog/wdt285.c +1 -1
@@ -168,7 +168,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, soft_margin = new_margin; reload = soft_margin * (mem_fclk_21285 /256 );watchdog_ping (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (soft_margin, int_arg);break ;
drivers/watchdog/wdt977.c +1 -1
@@ -398,7 +398,7 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,return -EINVAL ;wdt977_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, uarg.i);
drivers/watchdog/wdt_pci.c +1 -1
@@ -426,7 +426,7 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd,if (wdtpci_set_heartbeat (new_heartbeat))return -EINVAL ;wdtpci_ping (); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);default :
Quoted 7 lines · Gustavo A. R. Silva
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.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Reviewed-by Guenter Roeck <[email protected]>
Quoted 547 lines
--- drivers/watchdog/advantechwdt.c | 2 +- drivers/watchdog/alim1535_wdt.c | 2 +- drivers/watchdog/alim7101_wdt.c | 2 +- drivers/watchdog/ar7_wdt.c | 3 +-- drivers/watchdog/ath79_wdt.c | 2 +- drivers/watchdog/eurotechwdt.c | 2 +- drivers/watchdog/f71808e_wdt.c | 4 ++-- drivers/watchdog/gef_wdt.c | 2 +- drivers/watchdog/geodewdt.c | 2 +- drivers/watchdog/ib700wdt.c | 2 +- drivers/watchdog/it8712f_wdt.c | 2 +- drivers/watchdog/ixp4xx_wdt.c | 2 +- drivers/watchdog/m54xx_wdt.c | 2 +- drivers/watchdog/machzwd.c | 2 +- drivers/watchdog/mv64x60_wdt.c | 2 +- drivers/watchdog/nv_tco.c | 2 +- drivers/watchdog/pc87413_wdt.c | 2 +- drivers/watchdog/pcwd.c | 2 +- drivers/watchdog/pcwd_pci.c | 2 +- drivers/watchdog/pcwd_usb.c | 2 +- drivers/watchdog/rc32434_wdt.c | 2 +- drivers/watchdog/riowd.c | 2 +- drivers/watchdog/sa1100_wdt.c | 2 +- drivers/watchdog/sb_wdog.c | 2 +- drivers/watchdog/sbc60xxwdt.c | 2 +- drivers/watchdog/sbc7240_wdt.c | 2 +- drivers/watchdog/sbc_fitpc2_wdt.c | 2 +- drivers/watchdog/sc520_wdt.c | 2 +- drivers/watchdog/sch311x_wdt.c | 2 +- drivers/watchdog/smsc37b787_wdt.c | 2 +- drivers/watchdog/w83877f_wdt.c | 2 +- drivers/watchdog/w83977f_wdt.c | 2 +- drivers/watchdog/wafer5823wdt.c | 2 +- drivers/watchdog/watchdog_dev.c | 2 +- drivers/watchdog/wdt.c | 2 +- drivers/watchdog/wdt285.c | 2 +- drivers/watchdog/wdt977.c | 2 +- drivers/watchdog/wdt_pci.c | 2 +- 38 files changed, 39 insertions(+), 40 deletions(-)drivers/watchdog/advantechwdt.c +1
-1@@ -177,7 +177,7 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (advwdt_set_heartbeat (new_timeout))return -EINVAL ;advwdt_ping (); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :drivers/watchdog/alim1535_wdt.c +1
-1@@ -220,7 +220,7 @@ static long ali_ioctl(struct file *file, unsigned int cmd, unsigned long arg)return -EINVAL ;ali_keepalive (); } -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :drivers/watchdog/alim7101_wdt.c +1
-1@@ -279,7 +279,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) timeout = new_timeout;wdt_keepalive (); } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :drivers/watchdog/ar7_wdt.c +1
-2@@ -235,8 +235,7 @@ static long ar7_wdt_ioctl(struct file *file,ar7_wdt_update_margin (new_margin);ar7_wdt_kick (1 );spin_unlock (&wdt_lock); -/* Fall through */ - + fallthrough;case WDIOC_GETTIMEOUT :if (put_user (margin, (int *)arg))return -EFAULT ;drivers/watchdog/ath79_wdt.c +1
-1@@ -215,8 +215,8 @@ static long ath79_wdt_ioctl(struct file *file, unsigned int cmd, err =ath79_wdt_set_timeout (t);if (err)break ; + fallthrough; -/* fallthrough */ case WDIOC_GETTIMEOUT : err =put_user (timeout, p);break ;drivers/watchdog/eurotechwdt.c +1
-1@@ -286,7 +286,7 @@ static long eurwdt_ioctl(struct file *file, eurwdt_timeout = time;eurwdt_set_timeout (time);spin_unlock (&eurwdt_lock); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (eurwdt_timeout, p);drivers/watchdog/f71808e_wdt.c +2
-2@@ -629,7 +629,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,if (new_options &WDIOS_ENABLECARD )return watchdog_start (); -/* fall through */ + fallthrough;case WDIOC_KEEPALIVE :watchdog_keepalive ();@@ -643,7 +643,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,return -EINVAL ;watchdog_keepalive (); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (watchdog.timeout, uarg.i);drivers/watchdog/gef_wdt.c +1
-1@@ -201,7 +201,7 @@ static long gef_wdt_ioctl(struct file *file, unsigned int cmd,if (get_user (timeout, (int __user *)argp))return -EFAULT ;gef_wdt_set_timeout (timeout); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :if (put_user (gef_wdt_timeout, (int __user *)argp))drivers/watchdog/geodewdt.c +1
-1@@ -185,7 +185,7 @@ static long geodewdt_ioctl(struct file *file, unsigned int cmd,if (geodewdt_set_heartbeat (interval))return -EINVAL ; -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);drivers/watchdog/ib700wdt.c +1
-1@@ -214,7 +214,7 @@ static long ibwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (ibwdt_set_heartbeat (new_margin))return -EINVAL ;ibwdt_ping (); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);drivers/watchdog/it8712f_wdt.c +1
-1@@ -303,7 +303,7 @@ static long it8712f_wdt_ioctl(struct file *file, unsigned int cmd,superio_exit ();it8712f_wdt_ping (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :if (put_user (margin, p))return -EFAULT ;drivers/watchdog/ixp4xx_wdt.c +1
-1@@ -136,7 +136,7 @@ static long ixp4xx_wdt_ioctl(struct file *file, unsigned int cmd, heartbeat = time;wdt_enable (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (heartbeat, (int *)arg);drivers/watchdog/m54xx_wdt.c +1
-1@@ -155,7 +155,7 @@ static long m54xx_wdt_ioctl(struct file *file, unsigned int cmd, heartbeat = time;wdt_enable (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (heartbeat, (int *)arg);drivers/watchdog/machzwd.c +1
-1@@ -171,7 +171,7 @@ static inline void zf_set_timer(unsigned short new, unsigned char n)switch (n) {case WD1 :zf_writew (COUNTER_1 , new); -/* fall through */ + fallthrough;case WD2 :zf_writeb (COUNTER_2 , new >0xff ?0xff : new);default :drivers/watchdog/mv64x60_wdt.c +1
-1@@ -222,7 +222,7 @@ static long mv64x60_wdt_ioctl(struct file *file,if (get_user (timeout, (int __user *)argp))return -EFAULT ;mv64x60_wdt_set_timeout (timeout); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :if (put_user (mv64x60_wdt_timeout, (int __user *)argp))drivers/watchdog/nv_tco.c +1
-1@@ -250,7 +250,7 @@ static long nv_tco_ioctl(struct file *file, unsigned int cmd,if (tco_timer_set_heartbeat (new_heartbeat))return -EINVAL ;tco_timer_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);default :drivers/watchdog/pc87413_wdt.c +1
-1@@ -433,7 +433,7 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd,return -EINVAL ; timeout = new_timeout;pc87413_refresh (); -/* fall through - and return the new timeout... */ + fallthrough;/* and return the new timeout */ case WDIOC_GETTIMEOUT : new_timeout = timeout *60 ;return put_user (new_timeout, uarg.i);drivers/watchdog/pcwd.c +1
-1@@ -651,7 +651,7 @@ static long pcwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)return -EINVAL ;pcwd_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, argp);drivers/watchdog/pcwd_pci.c +1
-1@@ -542,7 +542,7 @@ static long pcipcwd_ioctl(struct file *file, unsigned int cmd,pcipcwd_keepalive (); } -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);drivers/watchdog/pcwd_usb.c +1
-1@@ -452,7 +452,7 @@ static long usb_pcwd_ioctl(struct file *file, unsigned int cmd,usb_pcwd_keepalive (usb_pcwd_device); } -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);drivers/watchdog/rc32434_wdt.c +1
-1@@ -230,7 +230,7 @@ static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd,return -EFAULT ;if (rc32434_wdt_set (new_timeout))return -EINVAL ; -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return copy_to_user (argp, &timeout,sizeof (int )) ? -EFAULT :0 ;default :drivers/watchdog/riowd.c +1
-1@@ -134,7 +134,7 @@ static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)return -EINVAL ; riowd_timeout = (new_margin +59 ) /60 ;riowd_writereg (p, riowd_timeout,WDTO_INDEX ); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (riowd_timeout *60 , (int __user *)argp);drivers/watchdog/sa1100_wdt.c +1
-1@@ -127,7 +127,7 @@ static long sa1100dog_ioctl(struct file *file, unsigned int cmd, pre_margin = oscr_freq * time;writel_relaxed (readl_relaxed (OSCR ) + pre_margin,OSMR3 ); -/*fall through*/ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (pre_margin / oscr_freq, p);drivers/watchdog/sb_wdog.c +1
-1@@ -202,7 +202,7 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, timeout = time;sbwdog_set (user_dog, timeout);sbwdog_pet (user_dog); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :/* drivers/watchdog/sbc60xxwdt.c +1
-1@@ -265,7 +265,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) timeout = new_timeout;wdt_keepalive (); } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :drivers/watchdog/sbc7240_wdt.c +1
-1@@ -195,7 +195,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (wdt_set_timeout (new_timeout))return -EINVAL ; } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, (int __user *)arg);default :drivers/watchdog/sbc_fitpc2_wdt.c +1
-1@@ -154,7 +154,7 @@ static long fitpc2_wdt_ioctl(struct file *file, unsigned int cmd, margin = time;wdt_enable (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (margin, (int *)arg);drivers/watchdog/sc520_wdt.c +1
-1@@ -321,7 +321,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)wdt_keepalive (); } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :drivers/watchdog/sch311x_wdt.c +1
-1@@ -295,7 +295,7 @@ static long sch311x_wdt_ioctl(struct file *file, unsigned int cmd,if (sch311x_wdt_set_heartbeat (new_timeout))return -EINVAL ;sch311x_wdt_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :drivers/watchdog/smsc37b787_wdt.c +1
-1@@ -474,7 +474,7 @@ static long wb_smsc_wdt_ioctl(struct file *file,return -EINVAL ; timeout = new_timeout;wb_smsc_wdt_set_timeout (timeout); -/* fall through - and return the new timeout... */ + fallthrough;/* and return the new timeout */ case WDIOC_GETTIMEOUT : new_timeout = timeout;if (unit ==UNIT_MINUTE )drivers/watchdog/w83877f_wdt.c +1
-1@@ -289,7 +289,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) timeout = new_timeout;wdt_keepalive (); } -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);default :drivers/watchdog/w83977f_wdt.c +1
-1@@ -422,7 +422,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)return -EINVAL ;wdt_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, uarg.i);drivers/watchdog/wafer5823wdt.c +1
-1@@ -174,7 +174,7 @@ static long wafwdt_ioctl(struct file *file, unsigned int cmd, timeout = new_timeout;wafwdt_stop ();wafwdt_start (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, p);drivers/watchdog/watchdog_dev.c +1
-1@@ -776,7 +776,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, err =watchdog_ping (wdd);if (err <0 )break ; -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :/* timeout == 0 means that we don't know the timeout */ if (wdd->timeout ==0 ) {drivers/watchdog/wdt.c +1
-1@@ -389,7 +389,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (wdt_set_heartbeat (new_heartbeat))return -EINVAL ;wdt_ping (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);default :drivers/watchdog/wdt285.c +1
-1@@ -168,7 +168,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, soft_margin = new_margin; reload = soft_margin * (mem_fclk_21285 /256 );watchdog_ping (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT : ret =put_user (soft_margin, int_arg);break ;drivers/watchdog/wdt977.c +1
-1@@ -398,7 +398,7 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,return -EINVAL ;wdt977_keepalive (); -/* Fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (timeout, uarg.i);drivers/watchdog/wdt_pci.c +1
-1@@ -426,7 +426,7 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd,if (wdtpci_set_heartbeat (new_heartbeat))return -EINVAL ;wdtpci_ping (); -/* fall through */ + fallthrough;case WDIOC_GETTIMEOUT :return put_user (heartbeat, p);default :
Quoted 11 lines · Guenter Roeck
Quoted 7 lines · Gustavo A. R. Silva
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.
Signed-off-by Gustavo A. R. Silva <[email protected]>Reviewed-by Guenter Roeck <[email protected]>
Thanks, Guenter.
--
Gustavo