* [PATCH] clk: samsung: s3c: Mark expected switch fall-through
@ 2018-04-04 1:09 ` Gustavo A. R. Silva
0 siblings, 0 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2018-04-04 1:09 UTC (permalink / raw)
To: Kukjin Kim, Krzysztof Kozlowski, Sylwester Nawrocki, Tomasz Figa,
Chanwoo Choi, Michael Turquette, Stephen Boyd
Cc: linux-arm-kernel, linux-samsung-soc, linux-clk, linux-kernel,
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 the comma wiht a dash,
which is what GCC is expecting to find when there are other comments
in the same line in which "fall through" appears.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
This code was compiled with GCC 7.3.0
drivers/clk/samsung/clk-s3c2443.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/samsung/clk-s3c2443.c b/drivers/clk/samsung/clk-s3c2443.c
index c46e6d5..7ebb87f 100644
--- a/drivers/clk/samsung/clk-s3c2443.c
+++ b/drivers/clk/samsung/clk-s3c2443.c
@@ -429,7 +429,7 @@ void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
ARRAY_SIZE(s3c2450_gates));
samsung_clk_register_alias(ctx, s3c2450_aliases,
ARRAY_SIZE(s3c2450_aliases));
- /* fall through, as s3c2450 extends the s3c2416 clocks */
+ /* fall through - as s3c2450 extends the s3c2416 clocks */
case S3C2416:
samsung_clk_register_div(ctx, s3c2416_dividers,
ARRAY_SIZE(s3c2416_dividers));
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] clk: samsung: s3c: Mark expected switch fall-through
@ 2018-04-04 1:09 ` Gustavo A. R. Silva
0 siblings, 0 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2018-04-04 1:09 UTC (permalink / raw)
To: linux-arm-kernel
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that in this particular case I replaced the comma wiht a dash,
which is what GCC is expecting to find when there are other comments
in the same line in which "fall through" appears.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
This code was compiled with GCC 7.3.0
drivers/clk/samsung/clk-s3c2443.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/samsung/clk-s3c2443.c b/drivers/clk/samsung/clk-s3c2443.c
index c46e6d5..7ebb87f 100644
--- a/drivers/clk/samsung/clk-s3c2443.c
+++ b/drivers/clk/samsung/clk-s3c2443.c
@@ -429,7 +429,7 @@ void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
ARRAY_SIZE(s3c2450_gates));
samsung_clk_register_alias(ctx, s3c2450_aliases,
ARRAY_SIZE(s3c2450_aliases));
- /* fall through, as s3c2450 extends the s3c2416 clocks */
+ /* fall through - as s3c2450 extends the s3c2416 clocks */
case S3C2416:
samsung_clk_register_div(ctx, s3c2416_dividers,
ARRAY_SIZE(s3c2416_dividers));
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] clk: samsung: s3c: Mark expected switch fall-through
2018-04-04 1:09 ` Gustavo A. R. Silva
(?)
(?)
@ 2018-04-05 20:24 ` Stephen Boyd
-1 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2018-04-05 20:24 UTC (permalink / raw)
To: Gustavo A. R. Silva, Chanwoo Choi, Krzysztof Kozlowski,
Kukjin Kim, Michael Turquette, Sylwester Nawrocki, Tomasz Figa
Cc: linux-arm-kernel, linux-samsung-soc, linux-clk, linux-kernel,
Gustavo A. R. Silva
Quoting Gustavo A. R. Silva (2018-04-03 18:09:31)
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> =
> Notice that in this particular case I replaced the comma wiht a dash,
s/wiht/with/
> which is what GCC is expecting to find when there are other comments
> in the same line in which "fall through" appears.
> =
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> This code was compiled with GCC 7.3.0
What's the GCC warning? Please include in the commit text.
Also what's the implicit-fallthrough level you're using? 3? Can you file
a bug so GCC can update their regex to accept a comma in addition to
whitespace characters?
And maybe we can change the level to 2 or 1 in the kernel's makefile so
we don't need to patch comments for this.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] clk: samsung: s3c: Mark expected switch fall-through
@ 2018-04-05 20:24 ` Stephen Boyd
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2018-04-05 20:24 UTC (permalink / raw)
To: Chanwoo Choi, Krzysztof Kozlowski, Kukjin Kim, Michael Turquette,
Sylwester Nawrocki, Tomasz Figa
Cc: linux-arm-kernel, linux-samsung-soc, linux-clk, linux-kernel,
Gustavo A. R. Silva
Quoting Gustavo A. R. Silva (2018-04-03 18:09:31)
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in this particular case I replaced the comma wiht a dash,
s/wiht/with/
> which is what GCC is expecting to find when there are other comments
> in the same line in which "fall through" appears.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> This code was compiled with GCC 7.3.0
What's the GCC warning? Please include in the commit text.
Also what's the implicit-fallthrough level you're using? 3? Can you file
a bug so GCC can update their regex to accept a comma in addition to
whitespace characters?
And maybe we can change the level to 2 or 1 in the kernel's makefile so
we don't need to patch comments for this.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] clk: samsung: s3c: Mark expected switch fall-through
@ 2018-04-05 20:24 ` Stephen Boyd
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2018-04-05 20:24 UTC (permalink / raw)
To: linux-arm-kernel
Quoting Gustavo A. R. Silva (2018-04-03 18:09:31)
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in this particular case I replaced the comma wiht a dash,
s/wiht/with/
> which is what GCC is expecting to find when there are other comments
> in the same line in which "fall through" appears.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> This code was compiled with GCC 7.3.0
What's the GCC warning? Please include in the commit text.
Also what's the implicit-fallthrough level you're using? 3? Can you file
a bug so GCC can update their regex to accept a comma in addition to
whitespace characters?
And maybe we can change the level to 2 or 1 in the kernel's makefile so
we don't need to patch comments for this.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] clk: samsung: s3c: Mark expected switch fall-through
@ 2018-04-05 20:24 ` Stephen Boyd
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2018-04-05 20:24 UTC (permalink / raw)
To: Gustavo A. R. Silva, Chanwoo Choi, Krzysztof Kozlowski,
Kukjin Kim, Michael Turquette, Sylwester Nawrocki, Tomasz Figa
Cc: linux-arm-kernel, linux-samsung-soc, linux-clk, linux-kernel,
Gustavo A. R. Silva
Quoting Gustavo A. R. Silva (2018-04-03 18:09:31)
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in this particular case I replaced the comma wiht a dash,
s/wiht/with/
> which is what GCC is expecting to find when there are other comments
> in the same line in which "fall through" appears.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> This code was compiled with GCC 7.3.0
What's the GCC warning? Please include in the commit text.
Also what's the implicit-fallthrough level you're using? 3? Can you file
a bug so GCC can update their regex to accept a comma in addition to
whitespace characters?
And maybe we can change the level to 2 or 1 in the kernel's makefile so
we don't need to patch comments for this.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] clk: samsung: s3c: Mark expected switch fall-through
2018-04-05 20:24 ` Stephen Boyd
@ 2018-04-05 23:11 ` Gustavo A. R. Silva
-1 siblings, 0 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2018-04-05 23:11 UTC (permalink / raw)
To: Stephen Boyd, Chanwoo Choi, Krzysztof Kozlowski, Kukjin Kim,
Michael Turquette, Sylwester Nawrocki, Tomasz Figa
Cc: linux-arm-kernel, linux-samsung-soc, linux-clk, linux-kernel
On 04/05/2018 03:24 PM, Stephen Boyd wrote:
> Quoting Gustavo A. R. Silva (2018-04-03 18:09:31)
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that in this particular case I replaced the comma wiht a dash,
>
> s/wiht/with/
>
Thanks for this.
>> which is what GCC is expecting to find when there are other comments
>> in the same line in which "fall through" appears.
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>> This code was compiled with GCC 7.3.0
>
> What's the GCC warning? Please include in the commit text.
>
drivers/clk/samsung/clk-s3c2443.c:430:3: warning: this statement may
fall through [-Wimplicit-fallthrough=]
samsung_clk_register_alias(ctx, s3c2450_aliases,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ARRAY_SIZE(s3c2450_aliases));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/samsung/clk-s3c2443.c:433:2: note: here
case S3C2416:
^~~~
> Also what's the implicit-fallthrough level you're using? 3? Can you file
> a bug so GCC can update their regex to accept a comma in addition to
> whitespace characters?
>
Yeah, I can talk to the GCC guys about that.
> And maybe we can change the level to 2 or 1 in the kernel's makefile so
> we don't need to patch comments for this.
>
Yeah, with level 2 I don't get that warning.
Thanks
--
Gustavo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] clk: samsung: s3c: Mark expected switch fall-through
@ 2018-04-05 23:11 ` Gustavo A. R. Silva
0 siblings, 0 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2018-04-05 23:11 UTC (permalink / raw)
To: linux-arm-kernel
On 04/05/2018 03:24 PM, Stephen Boyd wrote:
> Quoting Gustavo A. R. Silva (2018-04-03 18:09:31)
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that in this particular case I replaced the comma wiht a dash,
>
> s/wiht/with/
>
Thanks for this.
>> which is what GCC is expecting to find when there are other comments
>> in the same line in which "fall through" appears.
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>> This code was compiled with GCC 7.3.0
>
> What's the GCC warning? Please include in the commit text.
>
drivers/clk/samsung/clk-s3c2443.c:430:3: warning: this statement may
fall through [-Wimplicit-fallthrough=]
samsung_clk_register_alias(ctx, s3c2450_aliases,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ARRAY_SIZE(s3c2450_aliases));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/samsung/clk-s3c2443.c:433:2: note: here
case S3C2416:
^~~~
> Also what's the implicit-fallthrough level you're using? 3? Can you file
> a bug so GCC can update their regex to accept a comma in addition to
> whitespace characters?
>
Yeah, I can talk to the GCC guys about that.
> And maybe we can change the level to 2 or 1 in the kernel's makefile so
> we don't need to patch comments for this.
>
Yeah, with level 2 I don't get that warning.
Thanks
--
Gustavo
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-04-05 23:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-04 1:09 [PATCH] clk: samsung: s3c: Mark expected switch fall-through Gustavo A. R. Silva
2018-04-04 1:09 ` Gustavo A. R. Silva
2018-04-05 20:24 ` Stephen Boyd
2018-04-05 20:24 ` Stephen Boyd
2018-04-05 20:24 ` Stephen Boyd
2018-04-05 20:24 ` Stephen Boyd
2018-04-05 23:11 ` Gustavo A. R. Silva
2018-04-05 23:11 ` Gustavo A. R. Silva
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.