Skip to contentSkip to conversation

rtc: m41t80: fix fall-through annotation

PATCH In review Gustavo A. R. Silva 2 participants 3 messages Oct 4, 2018 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: m41t80: fix fall-through annotation

Replace "Fall" with a proper "Fall through" annotation.

This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough

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

---
 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
#1 lore raw

Hi,

Quoted 5 lines · Gustavo A. R. Silva

Replace "Fall" with a proper "Fall through" annotation.

This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough

Can we agree that this is absolutely not a fix? I don't wan't to have that needlessly backport on gazillion stable kernel.

Quoted 22 lines

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

---
 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
Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw
Quoted 12 lines · Alexandre Belloni

Hi,

Quoted 5 lines · Gustavo A. R. Silva

Replace "Fall" with a proper "Fall through" annotation.

This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough

Can we agree that this is absolutely not a fix? I don't wan't to have that needlessly backport on gazillion stable kernel.

Well, as clearly the intention of the developer was to add a fall-through comment, but it was incomplete, I considered this a fix. But, I see your point and I agree. There is not need for this to be applied to stable trees.

I will change the subject.

Thanks
--
Gustavo