* [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs
@ 2019-04-30 14:32 Gustavo A. R. Silva
2019-04-30 17:22 ` Stephen Boyd
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-04-30 14:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
Cc: linux-clk, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/clk/imx/clk-pllv3.c: In function ‘imx_clk_pllv3’:
drivers/clk/imx/clk-pllv3.c:446:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
pll->div_shift = 1;
~~~~~~~~~~~~~~~^~~
drivers/clk/imx/clk-pllv3.c:447:2: note: here
case IMX_PLLV3_USB:
^~~~
drivers/clk/imx/clk-pllv3.c:453:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
pll->denom_offset = PLL_IMX7_DENOM_OFFSET;
^
drivers/clk/imx/clk-pllv3.c:454:2: note: here
case IMX_PLLV3_AV:
^~~~
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/clk/imx/clk-pllv3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c
index e892b9a836e5..4110e713d259 100644
--- a/drivers/clk/imx/clk-pllv3.c
+++ b/drivers/clk/imx/clk-pllv3.c
@@ -444,6 +444,7 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
break;
case IMX_PLLV3_USB_VF610:
pll->div_shift = 1;
+ /* fall through */
case IMX_PLLV3_USB:
ops = &clk_pllv3_ops;
pll->powerup_set = true;
@@ -451,6 +452,7 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
case IMX_PLLV3_AV_IMX7:
pll->num_offset = PLL_IMX7_NUM_OFFSET;
pll->denom_offset = PLL_IMX7_DENOM_OFFSET;
+ /* fall through */
case IMX_PLLV3_AV:
ops = &clk_pllv3_av_ops;
break;
--
2.21.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs
2019-04-30 14:32 [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2019-04-30 17:22 ` Stephen Boyd
2019-04-30 17:28 ` Gustavo A. R. Silva
2019-05-03 12:58 ` Anson Huang
2019-05-03 16:03 ` Stephen Boyd
2 siblings, 1 reply; 6+ messages in thread
From: Stephen Boyd @ 2019-04-30 17:22 UTC (permalink / raw)
To: Gustavo A. R. Silva, Fabio Estevam, Michael Turquette,
NXP Linux Team, Pengutronix Kernel Team, Sascha Hauer, Shawn Guo
Cc: linux-clk, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva
Quoting Gustavo A. R. Silva (2019-04-30 07:32:06)
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> drivers/clk/imx/clk-pllv3.c: In function ‘imx_clk_pllv3’:
> drivers/clk/imx/clk-pllv3.c:446:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
> pll->div_shift = 1;
> ~~~~~~~~~~~~~~~^~~
> drivers/clk/imx/clk-pllv3.c:447:2: note: here
> case IMX_PLLV3_USB:
> ^~~~
> drivers/clk/imx/clk-pllv3.c:453:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
> pll->denom_offset = PLL_IMX7_DENOM_OFFSET;
> ^
> drivers/clk/imx/clk-pllv3.c:454:2: note: here
> case IMX_PLLV3_AV:
> ^~~~
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
It was sent by Anson already.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs
2019-04-30 17:22 ` Stephen Boyd
@ 2019-04-30 17:28 ` Gustavo A. R. Silva
2019-04-30 18:17 ` Stephen Boyd
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-04-30 17:28 UTC (permalink / raw)
To: Stephen Boyd, Fabio Estevam, Michael Turquette, NXP Linux Team,
Pengutronix Kernel Team, Sascha Hauer, Shawn Guo
Cc: linux-clk, linux-arm-kernel, linux-kernel
On 4/30/19 12:22 PM, Stephen Boyd wrote:
> Quoting Gustavo A. R. Silva (2019-04-30 07:32:06)
>> In preparation to enabling -Wimplicit-fallthrough, mark switch
>> cases where we are expecting to fall through.
>>
>> This patch fixes the following warnings:
>>
>> drivers/clk/imx/clk-pllv3.c: In function ‘imx_clk_pllv3’:
>> drivers/clk/imx/clk-pllv3.c:446:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
>> pll->div_shift = 1;
>> ~~~~~~~~~~~~~~~^~~
>> drivers/clk/imx/clk-pllv3.c:447:2: note: here
>> case IMX_PLLV3_USB:
>> ^~~~
>> drivers/clk/imx/clk-pllv3.c:453:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
>> pll->denom_offset = PLL_IMX7_DENOM_OFFSET;
>> ^
>> drivers/clk/imx/clk-pllv3.c:454:2: note: here
>> case IMX_PLLV3_AV:
>> ^~~~
>>
>> Warning level 3 was used: -Wimplicit-fallthrough=3
>>
>> This patch is part of the ongoing efforts to enable
>> -Wimplicit-fallthrough.
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>
> It was sent by Anson already.
>
Did he address both warnings?
Thanks
--
Gustavo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs
2019-04-30 17:28 ` Gustavo A. R. Silva
@ 2019-04-30 18:17 ` Stephen Boyd
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2019-04-30 18:17 UTC (permalink / raw)
To: Gustavo A. R. Silva, Fabio Estevam, Michael Turquette,
NXP Linux Team, Pengutronix Kernel Team, Sascha Hauer, Shawn Guo
Cc: linux-clk, linux-arm-kernel, linux-kernel
Quoting Gustavo A. R. Silva (2019-04-30 10:28:32)
>
>
> On 4/30/19 12:22 PM, Stephen Boyd wrote:
> > Quoting Gustavo A. R. Silva (2019-04-30 07:32:06)
> >> In preparation to enabling -Wimplicit-fallthrough, mark switch
> >> cases where we are expecting to fall through.
> >>
> >> This patch fixes the following warnings:
> >>
> >> drivers/clk/imx/clk-pllv3.c: In function ‘imx_clk_pllv3’:
> >> drivers/clk/imx/clk-pllv3.c:446:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
> >> pll->div_shift = 1;
> >> ~~~~~~~~~~~~~~~^~~
> >> drivers/clk/imx/clk-pllv3.c:447:2: note: here
> >> case IMX_PLLV3_USB:
> >> ^~~~
> >> drivers/clk/imx/clk-pllv3.c:453:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
> >> pll->denom_offset = PLL_IMX7_DENOM_OFFSET;
> >> ^
> >> drivers/clk/imx/clk-pllv3.c:454:2: note: here
> >> case IMX_PLLV3_AV:
> >> ^~~~
> >>
> >> Warning level 3 was used: -Wimplicit-fallthrough=3
> >>
> >> This patch is part of the ongoing efforts to enable
> >> -Wimplicit-fallthrough.
> >>
> >> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> >
> > It was sent by Anson already.
> >
>
> Did he address both warnings?
>
No. I added you to the thread.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs
2019-04-30 14:32 [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs Gustavo A. R. Silva
2019-04-30 17:22 ` Stephen Boyd
@ 2019-05-03 12:58 ` Anson Huang
2019-05-03 16:03 ` Stephen Boyd
2 siblings, 0 replies; 6+ messages in thread
From: Anson Huang @ 2019-05-03 12:58 UTC (permalink / raw)
To: Gustavo A. R. Silva, Michael Turquette, Stephen Boyd, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
dl-linux-imx
Cc: linux-clk, linux-arm-kernel, linux-kernel
> -----Original Message-----
> From: Gustavo A. R. Silva [mailto:gustavo@embeddedor.com]
> Sent: Tuesday, April 30, 2019 10:32 PM
> To: Michael Turquette <mturquette@baylibre.com>; Stephen Boyd
> <sboyd@kernel.org>; Shawn Guo <shawnguo@kernel.org>; Sascha Hauer
> <s.hauer@pengutronix.de>; Pengutronix Kernel Team
> <kernel@pengutronix.de>; Fabio Estevam <festevam@gmail.com>; dl-linux-
> imx <linux-imx@nxp.com>
> Cc: linux-clk@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; Gustavo A. R. Silva <gustavo@embeddedor.com>
> Subject: [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
> we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> drivers/clk/imx/clk-pllv3.c: In function ‘imx_clk_pllv3’:
> drivers/clk/imx/clk-pllv3.c:446:18: warning: this statement may fall through [-
> Wimplicit-fallthrough=]
> pll->div_shift = 1;
> ~~~~~~~~~~~~~~~^~~
> drivers/clk/imx/clk-pllv3.c:447:2: note: here
> case IMX_PLLV3_USB:
> ^~~~
> drivers/clk/imx/clk-pllv3.c:453:21: warning: this statement may fall through [-
> Wimplicit-fallthrough=]
> pll->denom_offset = PLL_IMX7_DENOM_OFFSET;
> ^
> drivers/clk/imx/clk-pllv3.c:454:2: note: here
> case IMX_PLLV3_AV:
> ^~~~
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/clk/imx/clk-pllv3.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c index
> e892b9a836e5..4110e713d259 100644
> --- a/drivers/clk/imx/clk-pllv3.c
> +++ b/drivers/clk/imx/clk-pllv3.c
> @@ -444,6 +444,7 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type,
> const char *name,
> break;
> case IMX_PLLV3_USB_VF610:
> pll->div_shift = 1;
> + /* fall through */
> case IMX_PLLV3_USB:
> ops = &clk_pllv3_ops;
> pll->powerup_set = true;
> @@ -451,6 +452,7 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type,
> const char *name,
> case IMX_PLLV3_AV_IMX7:
> pll->num_offset = PLL_IMX7_NUM_OFFSET;
> pll->denom_offset = PLL_IMX7_DENOM_OFFSET;
> + /* fall through */
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
> case IMX_PLLV3_AV:
> ops = &clk_pllv3_av_ops;
> break;
> --
> 2.21.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs
2019-04-30 14:32 [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs Gustavo A. R. Silva
2019-04-30 17:22 ` Stephen Boyd
2019-05-03 12:58 ` Anson Huang
@ 2019-05-03 16:03 ` Stephen Boyd
2 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2019-05-03 16:03 UTC (permalink / raw)
To: Gustavo A. R. Silva, Fabio Estevam, Michael Turquette,
NXP Linux Team, Pengutronix Kernel Team, Sascha Hauer, Shawn Guo
Cc: linux-clk, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva
Quoting Gustavo A. R. Silva (2019-04-30 07:32:06)
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> drivers/clk/imx/clk-pllv3.c: In function ‘imx_clk_pllv3’:
> drivers/clk/imx/clk-pllv3.c:446:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
> pll->div_shift = 1;
> ~~~~~~~~~~~~~~~^~~
> drivers/clk/imx/clk-pllv3.c:447:2: note: here
> case IMX_PLLV3_USB:
> ^~~~
> drivers/clk/imx/clk-pllv3.c:453:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
> pll->denom_offset = PLL_IMX7_DENOM_OFFSET;
> ^
> drivers/clk/imx/clk-pllv3.c:454:2: note: here
> case IMX_PLLV3_AV:
> ^~~~
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-05-03 16:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 14:32 [PATCH] clk: imx: clk-pllv3: mark expected switch fall-throughs Gustavo A. R. Silva
2019-04-30 17:22 ` Stephen Boyd
2019-04-30 17:28 ` Gustavo A. R. Silva
2019-04-30 18:17 ` Stephen Boyd
2019-05-03 12:58 ` Anson Huang
2019-05-03 16:03 ` Stephen Boyd
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).