From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Anson Huang <Anson.Huang@nxp.com>
Cc: linux-pwm@vger.kernel.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, linux-kernel@vger.kernel.org,
thierry.reding@gmail.com, Linux-imx@nxp.com,
kernel@pengutronix.de, festevam@gmail.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pwm: imx27: Eliminate error message for defer probe
Date: Mon, 30 Dec 2019 13:54:54 +0100 [thread overview]
Message-ID: <20191230125454.7i4dahdc3wclpkgz@pengutronix.de> (raw)
In-Reply-To: <1577674960-12011-1-git-send-email-Anson.Huang@nxp.com>
On Mon, Dec 30, 2019 at 11:02:40AM +0800, Anson Huang wrote:
> For defer probe error, no need to output error message which
> will cause confusion.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> drivers/pwm/pwm-imx27.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c
> index 59d8b12..35a7ac42 100644
> --- a/drivers/pwm/pwm-imx27.c
> +++ b/drivers/pwm/pwm-imx27.c
> @@ -319,9 +319,13 @@ static int pwm_imx27_probe(struct platform_device *pdev)
>
> imx->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
> if (IS_ERR(imx->clk_ipg)) {
> - dev_err(&pdev->dev, "getting ipg clock failed with %ld\n",
> - PTR_ERR(imx->clk_ipg));
> - return PTR_ERR(imx->clk_ipg);
> + int ret = PTR_ERR(imx->clk_ipg);
> +
> + if (ret != -EPROBE_DEFER)
> + dev_err(&pdev->dev,
> + "getting ipg clock failed with %d\n",
> + ret);
While you touch this part, you could convert to %pe to get a more
expressive error message.
But even independent of this the patch is fine, so
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-12-30 12:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-30 3:02 [PATCH] pwm: imx27: Eliminate error message for defer probe Anson Huang
2019-12-30 12:54 ` Uwe Kleine-König [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=20191230125454.7i4dahdc3wclpkgz@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=Anson.Huang@nxp.com \
--cc=Linux-imx@nxp.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=thierry.reding@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;
as well as URLs for NNTP newsgroup(s).