Skip to contentSkip to conversation

rtc: m41t80: mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Oct 4, 2018 – Oct 16, 2018 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 rtc: m41t80: mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Notice that in this particular case, I replaced "Fall" with a proper "Fall through" comment.

Addresses-Coverity-ID: 1373875 ("Missing break in switch")

---
Changes in v2:
- Change subject and commit log.

 drivers/rtc/rtc-m41t80.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-m41t80.c +1 -1
index ad03e2f..a3fb235 100644
@@ -745,7 +745,7 @@ static int wdt_ioctl(struct file *file, unsigned int cmd,
 			return -EINVAL;
 		wdt_margin = new_margin;
 		wdt_ping();
-		/* Fall */
+		/* Fall through */
 	case WDIOC_GETTIMEOUT:
 		return put_user(wdt_margin, (int __user *)arg);
 
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 8 lines · Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Notice that in this particular case, I replaced "Fall" with a proper "Fall through" comment.

Addresses-Coverity-ID: 1373875 ("Missing break in switch")

Applied, thanks.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com