All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Sam Protsenko <semen.protsenko@linaro.org>,
	David Virag <virag.david003@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v4 5/7] clk: samsung: clk-pll: Add support for pll1417x
Date: Wed, 8 Dec 2021 09:50:22 +0100	[thread overview]
Message-ID: <b7f5a30c-4148-32d8-39b2-2ba8bb64635a@canonical.com> (raw)
In-Reply-To: <CAPLW+4kSDHUsvHo0njykTTRGqaAehRt6MXdJF73OzR47avOm9Q@mail.gmail.com>

On 07/12/2021 20:00, Sam Protsenko wrote:
> On Mon, 6 Dec 2021 at 17:32, David Virag <virag.david003@gmail.com> wrote:
>>
>> pll1417x is used in Exynos7885 SoC for top-level integer PLLs.
>> It is similar enough to pll0822x that practically the same code can
>> handle both. The difference that's to be noted is that when defining a
>> pl1417x PLL, the "con" parameter of the PLL macro should be set to the
>> CON1 register instead of CON3, like this:
>>
>>     PLL(pll_1417x, CLK_FOUT_SHARED0_PLL, "fout_shared0_pll", "oscclk",
>>         PLL_LOCKTIME_PLL_SHARED0, PLL_CON0_PLL_SHARED0,
>>         NULL),
>>
>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> Signed-off-by: David Virag <virag.david003@gmail.com>
>> ---
>> Changes in v2:
>>   - Nothing
>>
>> Changes in v3:
>>   - Nothing
>>
>> Changes in v4:
>>   - Added R-b tag by Krzysztof Kozlowski
>>
>>  drivers/clk/samsung/clk-pll.c | 1 +
>>  drivers/clk/samsung/clk-pll.h | 1 +
>>  2 files changed, 2 insertions(+)
>>
>> diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
>> index 83d1b03647db..70cdc87f714e 100644
>> --- a/drivers/clk/samsung/clk-pll.c
>> +++ b/drivers/clk/samsung/clk-pll.c
>> @@ -1476,6 +1476,7 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
>>                 else
>>                         init.ops = &samsung_pll35xx_clk_ops;
>>                 break;
>> +       case pll_1417x:
> 
> I wonder why this switch have a bunch of fall through cases, but none
> marked with "fallthrough;" line, and both checkpatch and "make" turn
> blind eye on that? Anyway, I guess it's ok as is, just an observation.
> 

I think the fallthrough is needed for non-obvious cases where one case
has some code and misses a break. Something like:

switch () {
case a:
case b:
case c:
    foobar();
}

is obvious/explicit and does not need fallthrough.

Best regards,
Krzysztof

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Sam Protsenko <semen.protsenko@linaro.org>,
	David Virag <virag.david003@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v4 5/7] clk: samsung: clk-pll: Add support for pll1417x
Date: Wed, 8 Dec 2021 09:50:22 +0100	[thread overview]
Message-ID: <b7f5a30c-4148-32d8-39b2-2ba8bb64635a@canonical.com> (raw)
In-Reply-To: <CAPLW+4kSDHUsvHo0njykTTRGqaAehRt6MXdJF73OzR47avOm9Q@mail.gmail.com>

On 07/12/2021 20:00, Sam Protsenko wrote:
> On Mon, 6 Dec 2021 at 17:32, David Virag <virag.david003@gmail.com> wrote:
>>
>> pll1417x is used in Exynos7885 SoC for top-level integer PLLs.
>> It is similar enough to pll0822x that practically the same code can
>> handle both. The difference that's to be noted is that when defining a
>> pl1417x PLL, the "con" parameter of the PLL macro should be set to the
>> CON1 register instead of CON3, like this:
>>
>>     PLL(pll_1417x, CLK_FOUT_SHARED0_PLL, "fout_shared0_pll", "oscclk",
>>         PLL_LOCKTIME_PLL_SHARED0, PLL_CON0_PLL_SHARED0,
>>         NULL),
>>
>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> Signed-off-by: David Virag <virag.david003@gmail.com>
>> ---
>> Changes in v2:
>>   - Nothing
>>
>> Changes in v3:
>>   - Nothing
>>
>> Changes in v4:
>>   - Added R-b tag by Krzysztof Kozlowski
>>
>>  drivers/clk/samsung/clk-pll.c | 1 +
>>  drivers/clk/samsung/clk-pll.h | 1 +
>>  2 files changed, 2 insertions(+)
>>
>> diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
>> index 83d1b03647db..70cdc87f714e 100644
>> --- a/drivers/clk/samsung/clk-pll.c
>> +++ b/drivers/clk/samsung/clk-pll.c
>> @@ -1476,6 +1476,7 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
>>                 else
>>                         init.ops = &samsung_pll35xx_clk_ops;
>>                 break;
>> +       case pll_1417x:
> 
> I wonder why this switch have a bunch of fall through cases, but none
> marked with "fallthrough;" line, and both checkpatch and "make" turn
> blind eye on that? Anyway, I guess it's ok as is, just an observation.
> 

I think the fallthrough is needed for non-obvious cases where one case
has some code and misses a break. Something like:

switch () {
case a:
case b:
case c:
    foobar();
}

is obvious/explicit and does not need fallthrough.

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-12-08  8:50 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 15:31 [PATCH v4 0/7] Initial Samsung Galaxy A8 (2018) support David Virag
2021-12-06 15:31 ` David Virag
2021-12-06 15:31 ` [PATCH v4 1/7] dt-bindings: clock: Add bindings definitions for Exynos7885 CMU David Virag
2021-12-06 15:31   ` David Virag
2021-12-07 18:15   ` Sam Protsenko
2021-12-07 18:15     ` Sam Protsenko
2021-12-10 21:26   ` Rob Herring
2021-12-10 21:26     ` Rob Herring
2021-12-12 18:39   ` Krzysztof Kozlowski
2021-12-12 18:39     ` Krzysztof Kozlowski
2021-12-20  9:40     ` Krzysztof Kozlowski
2021-12-20  9:40       ` Krzysztof Kozlowski
2021-12-19 22:52   ` Sylwester Nawrocki
2021-12-19 22:52     ` Sylwester Nawrocki
2021-12-06 15:31 ` [PATCH v4 2/7] dt-bindings: clock: Document Exynos7885 CMU bindings David Virag
2021-12-06 15:31   ` David Virag
2021-12-07 18:23   ` Sam Protsenko
2021-12-07 18:23     ` Sam Protsenko
2021-12-10 21:28   ` Rob Herring
2021-12-10 21:28     ` Rob Herring
2021-12-06 15:31 ` [PATCH v4 3/7] dt-bindings: arm: samsung: document jackpotlte board binding David Virag
2021-12-06 15:31   ` David Virag
2021-12-07 18:26   ` Sam Protsenko
2021-12-07 18:26     ` Sam Protsenko
2021-12-10 21:30   ` Rob Herring
2021-12-10 21:30     ` Rob Herring
2021-12-15 16:21   ` (subset) " Krzysztof Kozlowski
2021-12-15 16:21     ` Krzysztof Kozlowski
2021-12-19 14:53     ` David Virag
2021-12-19 14:53       ` David Virag
2021-12-20  9:38       ` Krzysztof Kozlowski
2021-12-20  9:38         ` Krzysztof Kozlowski
2021-12-06 15:31 ` [PATCH v4 4/7] clk: samsung: Make exynos850_register_cmu shared David Virag
2021-12-06 15:31   ` David Virag
2021-12-07  9:32   ` Krzysztof Kozlowski
2021-12-07  9:32     ` Krzysztof Kozlowski
2021-12-07 18:53   ` Sam Protsenko
2021-12-07 18:53     ` Sam Protsenko
2021-12-06 15:31 ` [PATCH v4 5/7] clk: samsung: clk-pll: Add support for pll1417x David Virag
2021-12-06 15:31   ` David Virag
2021-12-07 19:00   ` Sam Protsenko
2021-12-07 19:00     ` Sam Protsenko
2021-12-08  8:50     ` Krzysztof Kozlowski [this message]
2021-12-08  8:50       ` Krzysztof Kozlowski
2021-12-06 15:31 ` [PATCH v4 6/7] clk: samsung: Add initial Exynos7885 clock driver David Virag
2021-12-06 15:31   ` David Virag
2021-12-07  9:33   ` Krzysztof Kozlowski
2021-12-07  9:33     ` Krzysztof Kozlowski
2021-12-07 19:14   ` Sam Protsenko
2021-12-07 19:14     ` Sam Protsenko
2021-12-06 15:31 ` [PATCH v4 7/7] arm64: dts: exynos: Add initial device tree support for Exynos7885 SoC David Virag
2021-12-06 15:31   ` David Virag
2021-12-07  9:39   ` Krzysztof Kozlowski
2021-12-07  9:39     ` Krzysztof Kozlowski
2021-12-07 19:42   ` Marc Zyngier
2021-12-07 19:42     ` Marc Zyngier
2021-12-19 14:36     ` David Virag
2021-12-19 14:36       ` David Virag
2021-12-20  8:44       ` Marc Zyngier
2021-12-20  8:44         ` Marc Zyngier
2021-12-07 20:19   ` Sam Protsenko
2021-12-07 20:19     ` Sam Protsenko
2021-12-07 22:29     ` David Virag
2021-12-07 22:29       ` David Virag
2021-12-08  0:55       ` Chanho Park
2021-12-08  0:55         ` Chanho Park
2021-12-08  9:05     ` Krzysztof Kozlowski
2021-12-08  9:05       ` Krzysztof Kozlowski
2021-12-08 15:37       ` Sam Protsenko
2021-12-08 15:37         ` Sam Protsenko
2021-12-08 16:28         ` Krzysztof Kozlowski
2021-12-08 16:28           ` Krzysztof Kozlowski
2021-12-08 16:51           ` Sam Protsenko
2021-12-08 16:51             ` Sam Protsenko
2022-01-31 15:35   ` Krzysztof Kozlowski
2022-01-31 15:35     ` Krzysztof Kozlowski
2022-02-01  0:47     ` David Virag
2022-02-01  0:47       ` David Virag

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b7f5a30c-4148-32d8-39b2-2ba8bb64635a@canonical.com \
    --to=krzysztof.kozlowski@canonical.com \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@kernel.org \
    --cc=semen.protsenko@linaro.org \
    --cc=tomasz.figa@gmail.com \
    --cc=virag.david003@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.