From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Christophe Roullier <christophe.roullier@st.com>,
wim@linux-watchdog.org, linux@roeck-us.net,
mcoquelin.stm32@gmail.com, alexandre.torgue@st.com
Cc: Etienne Carriere <etienne.carriere@st.com>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [Linux-stm32] [PATCH 1/1] watchdog: stm32_iwdg: don't print an error on probe deferral
Date: Fri, 6 Nov 2020 10:47:59 +0100 [thread overview]
Message-ID: <ed817cfc-a338-0e41-b4d5-56da42677d26@pengutronix.de> (raw)
In-Reply-To: <20201106094627.21132-1-christophe.roullier@st.com>
Hello Christophe,
On 11/6/20 10:46 AM, Christophe Roullier wrote:
> From: Etienne Carriere <etienne.carriere@st.com>
>
> Do not print an error trace when deferring probe for clock resources.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
> Signed-off-by: Christophe Roullier <christophe.roullier@st.com>
> ---
> drivers/watchdog/stm32_iwdg.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c
> index 25188d6bbe15..1b71c205cee0 100644
> --- a/drivers/watchdog/stm32_iwdg.c
> +++ b/drivers/watchdog/stm32_iwdg.c
> @@ -163,7 +163,8 @@ static int stm32_iwdg_clk_init(struct platform_device *pdev,
>
> wdt->clk_lsi = devm_clk_get(dev, "lsi");
> if (IS_ERR(wdt->clk_lsi)) {
> - dev_err(dev, "Unable to get lsi clock\n");
> + if (PTR_ERR(wdt->clk_lsi) != -EPROBE_DEFER)
> + dev_err(dev, "Unable to get lsi clock\n");
Can you use dev_err_probe instead?
Cheers,
Ahmad
> return PTR_ERR(wdt->clk_lsi);
> }
>
> @@ -171,7 +172,8 @@ static int stm32_iwdg_clk_init(struct platform_device *pdev,
> if (wdt->data->has_pclk) {
> wdt->clk_pclk = devm_clk_get(dev, "pclk");
> if (IS_ERR(wdt->clk_pclk)) {
> - dev_err(dev, "Unable to get pclk clock\n");
> + if (PTR_ERR(wdt->clk_pclk) != -EPROBE_DEFER)
> + dev_err(dev, "Unable to get pclk clock\n");
> return PTR_ERR(wdt->clk_pclk);
> }
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2020-11-06 9:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 9:46 [PATCH 1/1] watchdog: stm32_iwdg: don't print an error on probe deferral Christophe Roullier
2020-11-06 9:47 ` Ahmad Fatoum [this message]
2020-11-06 13:06 ` Guenter Roeck
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=ed817cfc-a338-0e41-b4d5-56da42677d26@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=alexandre.torgue@st.com \
--cc=christophe.roullier@st.com \
--cc=etienne.carriere@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mcoquelin.stm32@gmail.com \
--cc=wim@linux-watchdog.org \
/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;
as well as URLs for NNTP newsgroup(s).