[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <33c35580-e6d6-4c66-80b4-2f5769ce4e67@foss.st.com>
Date: Tue, 13 May 2025 17:22:01 +0200
From: Patrice CHOTARD <patrice.chotard@...s.st.com>
To: Krzysztof Kozlowski <krzk@...nel.org>,
Dan Carpenter
<dan.carpenter@...aro.org>
CC: Rob Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Maxime
Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue
<alexandre.torgue@...s.st.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Catalin Marinas
<catalin.marinas@....com>,
Will Deacon <will@...nel.org>, <christophe.kerello@...s.st.com>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v11 2/3] memory: Add STM32 Octo Memory Manager driver
On 5/13/25 09:54, Krzysztof Kozlowski wrote:
> On 09/05/2025 10:32, Dan Carpenter wrote:
>> On Mon, Apr 28, 2025 at 10:58:31AM +0200, Patrice Chotard wrote:
>>> +static int stm32_omm_toggle_child_clock(struct device *dev, bool enable)
>>> +{
>>> + struct stm32_omm *omm = dev_get_drvdata(dev);
>>> + int i, ret;
>>> +
>>> + for (i = 0; i < omm->nb_child; i++) {
>>> + if (enable) {
>>> + ret = clk_prepare_enable(omm->clk_bulk[i + 1].clk);
>>> + if (ret) {
>>> + dev_err(dev, "Can not enable clock\n");
>>> + goto clk_error;
>>> + }
>>> + } else {
>>> + clk_disable_unprepare(omm->clk_bulk[i + 1].clk);
>>> + }
>>> + }
>>> +
>>> + return 0;
>>> +
>>> +clk_error:
>>> + while (i--)
>>> + clk_disable_unprepare(omm->clk_bulk[i + 1].clk);
>>> +
>>> + return ret;
>>> +}
>>> +
>>> +static int stm32_omm_disable_child(struct device *dev)
>>> +{
>>> + struct stm32_omm *omm = dev_get_drvdata(dev);
>>> + struct reset_control *reset;
>>> + int ret;
>>> + u8 i;
>>> +
>>> + ret = stm32_omm_toggle_child_clock(dev, true);
>>> + if (!ret)
>> ^^^^
>> I'm pretty sure this was intended to be if (ret) and the ! is a typo.
Hi Dan
You are right, it's a typo.
Thanks
Patrice
>>
>>> + return ret;
>>
>> If it's not a typo please write this as:
>>
>> if (!ret)
>> return 0;
>
> For the record I consider this a bug report which still needs addressing
> by the authors.
>
> Best regards,
> Krzysztof
Powered by blists - more mailing lists