From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>, Peng Fan <peng.fan@nxp.com>,
Richard Zhu <hongxing.zhu@nxp.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Mathieu Poirier <mathieu.poirer@linaro.org>,
linux-remoteproc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] remoteproc: imx_rproc: Simplify some error message
Date: Tue, 23 Aug 2022 13:22:47 -0600 [thread overview]
Message-ID: <20220823192247.GA1781852@p14s> (raw)
In-Reply-To: <6b9343c2688117a340661d8ee491c2962c54a09a.1659736936.git.christophe.jaillet@wanadoo.fr>
On Sat, Aug 06, 2022 at 12:02:32AM +0200, Christophe JAILLET wrote:
> dev_err_probe() already prints the error code in a human readable way, so
> there is no need to duplicate it as a numerical value at the end of the
> message.
>
> While at it, remove 'ret' that is mostly useless.
>
> Fixes: 2df7062002d0 ("remoteproc: imx_proc: enable virtio/mailbox")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/remoteproc/imx_rproc.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
Applied.
Thanks,
Mathieu
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index 38383e7de3c1..7cc4fd207e2d 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -646,7 +646,6 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc)
> struct imx_rproc *priv = rproc->priv;
> struct device *dev = priv->dev;
> struct mbox_client *cl;
> - int ret;
>
> if (!of_get_property(dev->of_node, "mbox-names", NULL))
> return 0;
> @@ -659,18 +658,15 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc)
> cl->rx_callback = imx_rproc_rx_callback;
>
> priv->tx_ch = mbox_request_channel_byname(cl, "tx");
> - if (IS_ERR(priv->tx_ch)) {
> - ret = PTR_ERR(priv->tx_ch);
> - return dev_err_probe(cl->dev, ret,
> - "failed to request tx mailbox channel: %d\n", ret);
> - }
> + if (IS_ERR(priv->tx_ch))
> + return dev_err_probe(cl->dev, PTR_ERR(priv->tx_ch),
> + "failed to request tx mailbox channel\n");
>
> priv->rx_ch = mbox_request_channel_byname(cl, "rx");
> if (IS_ERR(priv->rx_ch)) {
> mbox_free_channel(priv->tx_ch);
> - ret = PTR_ERR(priv->rx_ch);
> - return dev_err_probe(cl->dev, ret,
> - "failed to request rx mailbox channel: %d\n", ret);
> + return dev_err_probe(cl->dev, PTR_ERR(priv->rx_ch),
> + "failed to request rx mailbox channel\n");
> }
>
> return 0;
> --
> 2.34.1
>
_______________________________________________
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:[~2022-08-23 19:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 22:02 [PATCH] remoteproc: imx_rproc: Simplify some error message Christophe JAILLET
2022-08-23 19:22 ` Mathieu Poirier [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=20220823192247.GA1781852@p14s \
--to=mathieu.poirier@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=festevam@gmail.com \
--cc=hongxing.zhu@nxp.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirer@linaro.org \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.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).