linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: (f71882fg) Mark expected switch fall-through
@ 2019-02-11 22:07 Gustavo A. R. Silva
  2019-02-12 21:51 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-11 22:07 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck
  Cc: linux-hwmon, linux-kernel, Gustavo A. R. Silva, Kees Cook

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

This patch fixes the following warnings:

drivers/hwmon/f71882fg.c: In function ‘f71882fg_probe’:
drivers/hwmon/f71882fg.c:2457:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
    data->auto_point_temp_signed = 1;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/hwmon/f71882fg.c:2459:3: note: here
   case f71889fg:
   ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

Notice that, in this particular case, the code comment is modified
in accordance with what GCC is expecting to find.

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/hwmon/f71882fg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
index ca54ce5c8e10..83023798e489 100644
--- a/drivers/hwmon/f71882fg.c
+++ b/drivers/hwmon/f71882fg.c
@@ -2455,7 +2455,7 @@ static int f71882fg_probe(struct platform_device *pdev)
 		case f71869a:
 			/* These always have signed auto point temps */
 			data->auto_point_temp_signed = 1;
-			/* Fall through to select correct fan/pwm reg bank! */
+			/* Fall through - to select correct fan/pwm reg bank! */
 		case f71889fg:
 		case f71889ed:
 		case f71889a:
-- 
2.20.1


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

* Re: [PATCH] hwmon: (f71882fg) Mark expected switch fall-through
  2019-02-11 22:07 [PATCH] hwmon: (f71882fg) Mark expected switch fall-through Gustavo A. R. Silva
@ 2019-02-12 21:51 ` Guenter Roeck
  2019-02-12 22:08   ` Gustavo A. R. Silva
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2019-02-12 21:51 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Jean Delvare, linux-hwmon, linux-kernel, Kees Cook

On Mon, Feb 11, 2019 at 04:07:38PM -0600, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
> 
> This patch fixes the following warnings:
> 
> drivers/hwmon/f71882fg.c: In function ‘f71882fg_probe’:
> drivers/hwmon/f71882fg.c:2457:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     data->auto_point_temp_signed = 1;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
> drivers/hwmon/f71882fg.c:2459:3: note: here
>    case f71889fg:
>    ^~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> Notice that, in this particular case, the code comment is modified
> in accordance with what GCC is expecting to find.
> 
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/f71882fg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
> index ca54ce5c8e10..83023798e489 100644
> --- a/drivers/hwmon/f71882fg.c
> +++ b/drivers/hwmon/f71882fg.c
> @@ -2455,7 +2455,7 @@ static int f71882fg_probe(struct platform_device *pdev)
>  		case f71869a:
>  			/* These always have signed auto point temps */
>  			data->auto_point_temp_signed = 1;
> -			/* Fall through to select correct fan/pwm reg bank! */
> +			/* Fall through - to select correct fan/pwm reg bank! */
>  		case f71889fg:
>  		case f71889ed:
>  		case f71889a:

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

* Re: [PATCH] hwmon: (f71882fg) Mark expected switch fall-through
  2019-02-12 21:51 ` Guenter Roeck
@ 2019-02-12 22:08   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-12 22:08 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Jean Delvare, linux-hwmon, linux-kernel, Kees Cook



On 2/12/19 3:51 PM, Guenter Roeck wrote:
> On Mon, Feb 11, 2019 at 04:07:38PM -0600, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch
>> cases where we are expecting to fall through.
>>
>> This patch fixes the following warnings:
>>
>> drivers/hwmon/f71882fg.c: In function ‘f71882fg_probe’:
>> drivers/hwmon/f71882fg.c:2457:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
>>     data->auto_point_temp_signed = 1;
>>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
>> drivers/hwmon/f71882fg.c:2459:3: note: here
>>    case f71889fg:
>>    ^~~~
>>
>> Warning level 3 was used: -Wimplicit-fallthrough=3
>>
>> Notice that, in this particular case, the code comment is modified
>> in accordance with what GCC is expecting to find.
>>
>> This patch is part of the ongoing efforts to enable
>> -Wimplicit-fallthrough.
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> 
> Applied to hwmon-next.
> 

Thanks, Guenter.

--
Gustavo

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

end of thread, other threads:[~2019-02-12 22:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 22:07 [PATCH] hwmon: (f71882fg) Mark expected switch fall-through Gustavo A. R. Silva
2019-02-12 21:51 ` Guenter Roeck
2019-02-12 22:08   ` 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).