From: Peter Chen <peter.chen@kernel.org>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Dmitry Osipenko <digetx@gmail.com>,
Peter Geis <pgwipeout@gmail.com>,
Thierry Reding <treding@nvidia.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH 3/3] usb: chipidea: tegra: Consistently use dev_err_probe()
Date: Mon, 25 Sep 2023 19:47:48 +0800 [thread overview]
Message-ID: <20230925114748.GB2070044@nchen-desktop> (raw)
In-Reply-To: <a1d8233f153bdd9f18661f33497dcff95bf217fc.1695497666.git.mirq-linux@rere.qmqm.pl>
On 23-09-23 21:41:56, Michał Mirosław wrote:
> Convert all error exits from probe() to dev_err_probe().
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Peter Chen <peter.chen@kernel.org>
Peter
> ---
> drivers/usb/chipidea/ci_hdrc_tegra.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
> index 8e78bf643e25..2cc305803217 100644
> --- a/drivers/usb/chipidea/ci_hdrc_tegra.c
> +++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
> @@ -293,14 +293,12 @@ static int tegra_usb_probe(struct platform_device *pdev)
> usb->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0);
> if (IS_ERR(usb->phy))
> return dev_err_probe(&pdev->dev, PTR_ERR(usb->phy),
> - "failed to get PHY\n");
> + "failed to get PHY");
>
> usb->clk = devm_clk_get(&pdev->dev, NULL);
> - if (IS_ERR(usb->clk)) {
> - err = PTR_ERR(usb->clk);
> - dev_err(&pdev->dev, "failed to get clock: %d\n", err);
> - return err;
> - }
> + if (IS_ERR(usb->clk))
> + return dev_err_probe(&pdev->dev, PTR_ERR(usb->clk),
> + "failed to get clock");
>
> err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev);
> if (err)
> @@ -316,7 +314,7 @@ static int tegra_usb_probe(struct platform_device *pdev)
>
> err = tegra_usb_reset_controller(&pdev->dev);
> if (err) {
> - dev_err(&pdev->dev, "failed to reset controller: %d\n", err);
> + dev_err_probe(&pdev->dev, err, "failed to reset controller");
> goto fail_power_off;
> }
>
> @@ -347,8 +345,8 @@ static int tegra_usb_probe(struct platform_device *pdev)
> usb->dev = ci_hdrc_add_device(&pdev->dev, pdev->resource,
> pdev->num_resources, &usb->data);
> if (IS_ERR(usb->dev)) {
> - err = PTR_ERR(usb->dev);
> - dev_err(&pdev->dev, "failed to add HDRC device: %d\n", err);
> + err = dev_err_probe(&pdev->dev, PTR_ERR(usb->dev),
> + "failed to add HDRC device");
> goto phy_shutdown;
> }
>
> --
> 2.39.2
>
--
Thanks,
Peter Chen
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-09-25 11:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-23 19:41 [PATCH 0/3] usb: chipidea: Tegra USB DMA fix + cleanups Michał Mirosław
2023-09-23 19:41 ` [PATCH 1/3] usb: chipidea: Fix DMA overwrite for Tegra Michał Mirosław
2023-09-25 11:45 ` Peter Chen
2023-09-25 23:53 ` Michał Mirosław
2023-09-26 12:11 ` Peter Chen
2023-09-23 19:41 ` [PATCH 3/3] usb: chipidea: tegra: Consistently use dev_err_probe() Michał Mirosław
2023-09-25 11:47 ` Peter Chen [this message]
2023-09-23 19:41 ` [PATCH 2/3] usb: chipidea: Simplify Tegra DMA alignment code Michał Mirosław
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=20230925114748.GB2070044@nchen-desktop \
--to=peter.chen@kernel.org \
--cc=digetx@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
--cc=pgwipeout@gmail.com \
--cc=treding@nvidia.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