From: Antonio Borneo <antonio.borneo@foss.st.com>
To: Marek Vasut <marex@denx.de>, Mingwei Zheng <zmw12306@gmail.com>
Cc: <linus.walleij@linaro.org>, <mcoquelin.stm32@gmail.com>,
<alexandre.torgue@foss.st.com>, <make24@iscas.ac.cn>,
<peng.fan@nxp.com>, <fabien.dessenne@foss.st.com>,
<linux-gpio@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Jiasheng Jiang <jiashengjiangcool@gmail.com>
Subject: Re: [PATCH v5] pinctrl: stm32: Add check for clk_enable()
Date: Thu, 2 Jan 2025 12:15:15 +0100 [thread overview]
Message-ID: <01c0ce6be637669ed07cfaf0aa6ef27fed7b8b16.camel@foss.st.com> (raw)
In-Reply-To: <9745b3ee-ae89-4edb-8ff7-b20096dbe1de@denx.de>
On Mon, 2024-12-16 at 00:41 +0100, Marek Vasut wrote:
> On 12/15/24 9:40 PM, Mingwei Zheng wrote:
>
> [...]
>
> > @@ -1617,10 +1602,18 @@ int stm32_pctl_probe(struct platform_device *pdev)
> > return -EINVAL;
> > }
> > pctl->banks = devm_kcalloc(dev, banks, sizeof(*pctl->banks),
> > - GFP_KERNEL);
> > + GFP_KERNEL);
>
> Please drop this one change.
>
> > if (!pctl->banks)
> > return -ENOMEM;
> >
> > + pctl->clks = devm_kcalloc(dev, banks, sizeof(*pctl->clks),
> > + GFP_KERNEL);
> > + if (!pctl->clks)
> > + return -ENOMEM;
> > +
> > + for (i = 0; i < banks; ++i)
> > + pctl->clks[i].id = "";
>
> Is this ^ assignment necessary ? If so, why ?
The existing DTs don't have the 'clock-names' property, whose value is used to set this struct clk_bulk_data::id.
With this field kept at NULL, the error messages in clk_bulk_enable() and similar should print '(null)'.
This line sets it to empty string.
I would say it's not necessary, but I don't know if it's better to have:
"Failed to enable clk '': %d"
or
"Failed to enable clk '(null)': %d"
Antonio
prev parent reply other threads:[~2025-01-02 11:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-15 20:40 [PATCH v5] pinctrl: stm32: Add check for clk_enable() Mingwei Zheng
2024-12-15 23:41 ` Marek Vasut
2024-12-23 2:23 ` Mingwei Zheng
2025-01-02 11:15 ` Antonio Borneo [this message]
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=01c0ce6be637669ed07cfaf0aa6ef27fed7b8b16.camel@foss.st.com \
--to=antonio.borneo@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=fabien.dessenne@foss.st.com \
--cc=jiashengjiangcool@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=make24@iscas.ac.cn \
--cc=marex@denx.de \
--cc=mcoquelin.stm32@gmail.com \
--cc=peng.fan@nxp.com \
--cc=zmw12306@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox