Skip to contentSkip to conversation

watchdog: sc1200wdt: Use fallthrough pseudo-keyword

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jul 27, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: sc1200wdt: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

---
 drivers/watchdog/sc1200wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/sc1200wdt.c +1 -1
index 9673eb12dacd..f22ebe89fe13 100644
@@ -234,7 +234,7 @@ static long sc1200wdt_ioctl(struct file *file, unsigned int cmd,
 			return -EINVAL;
 		timeout = new_timeout;
 		sc1200wdt_write_data(WDTO, timeout);
-		/* fall through - and return the new timeout */
+		fallthrough;	/* and return the new timeout */
 
 	case WDIOC_GETTIMEOUT:
 		return put_user(timeout * 60, p);
Signature · 1 line
2.27.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Gustavo A. R. Silva

Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Quoted 18 lines
---
 drivers/watchdog/sc1200wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/sc1200wdt.c +1 -1
index 9673eb12dacd..f22ebe89fe13 100644
@@ -234,7 +234,7 @@ static long sc1200wdt_ioctl(struct file *file, unsigned int cmd,
 			return -EINVAL;
 		timeout = new_timeout;
 		sc1200wdt_write_data(WDTO, timeout);
-		/* fall through - and return the new timeout */
+		fallthrough;	/* and return the new timeout */
 
 	case WDIOC_GETTIMEOUT:
 		return put_user(timeout * 60, p);