linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: m41t80: fix fall-through annotation
@ 2018-10-04 12:35 Gustavo A. R. Silva
  2018-10-04 12:53 ` Alexandre Belloni
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-04 12:35 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni
  Cc: linux-rtc, linux-kernel, Gustavo A. R. Silva

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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/rtc/rtc-m41t80.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index ad03e2f..a3fb235 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -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);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtc: m41t80: fix fall-through annotation
  2018-10-04 12:35 [PATCH] rtc: m41t80: fix fall-through annotation Gustavo A. R. Silva
@ 2018-10-04 12:53 ` Alexandre Belloni
  2018-10-04 13:01   ` Gustavo A. R. Silva
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Belloni @ 2018-10-04 12:53 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Alessandro Zummo, linux-rtc, linux-kernel

Hi,

On 04/10/2018 14:35:28+0200, Gustavo A. R. Silva wrote:
> 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.

> Addresses-Coverity-ID: 1373875 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/rtc/rtc-m41t80.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
> index ad03e2f..a3fb235 100644
> --- a/drivers/rtc/rtc-m41t80.c
> +++ b/drivers/rtc/rtc-m41t80.c
> @@ -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);
>  
> -- 
> 2.7.4
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtc: m41t80: fix fall-through annotation
  2018-10-04 12:53 ` Alexandre Belloni
@ 2018-10-04 13:01   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-04 13:01 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: Alessandro Zummo, linux-rtc, linux-kernel



On 10/4/18 2:53 PM, Alexandre Belloni wrote:
> Hi,
> 
> On 04/10/2018 14:35:28+0200, Gustavo A. R. Silva wrote:
>> 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-04 13:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-04 12:35 [PATCH] rtc: m41t80: fix fall-through annotation Gustavo A. R. Silva
2018-10-04 12:53 ` Alexandre Belloni
2018-10-04 13:01   ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).