From: <Conor.Dooley@microchip.com>
To: <christophe.jaillet@wanadoo.fr>, <Conor.Dooley@microchip.com>,
<Daire.McNamara@microchip.com>, <broonie@kernel.org>,
<yangyingliang@huawei.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
<linux-riscv@lists.infradead.org>, <linux-spi@vger.kernel.org>
Subject: Re: [PATCH] spi: microchip-core: Simplify some error message
Date: Fri, 5 Aug 2022 21:49:22 +0000 [thread overview]
Message-ID: <e2450741-af74-2cdd-58aa-6483a639306b@microchip.com> (raw)
In-Reply-To: <fb894ecec68e03fb7fc9353027c8b1a2610833d7.1659735153.git.christophe.jaillet@wanadoo.fr>
On 05/08/2022 22:33, 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.
>
> Moreover, in the case of devm_clk_get() it would only display '0' because
> 'ret' is know to be 0 at this point.
>
> Fixes: cdeaf3a99a02 ("spi: microchip-core: switch to use dev_err_probe()")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
bah, should have noticed that when I reviewed the switch over...
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks!
> ---
> drivers/spi/spi-microchip-core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
> index ce4385330b19..d352844c798c 100644
> --- a/drivers/spi/spi-microchip-core.c
> +++ b/drivers/spi/spi-microchip-core.c
> @@ -548,12 +548,12 @@ static int mchp_corespi_probe(struct platform_device *pdev)
> IRQF_SHARED, dev_name(&pdev->dev), master);
> if (ret)
> return dev_err_probe(&pdev->dev, ret,
> - "could not request irq: %d\n", ret);
> + "could not request irq\n");
>
> spi->clk = devm_clk_get(&pdev->dev, NULL);
> if (IS_ERR(spi->clk))
> return dev_err_probe(&pdev->dev, PTR_ERR(spi->clk),
> - "could not get clk: %d\n", ret);
> + "could not get clk\n");
>
> ret = clk_prepare_enable(spi->clk);
> if (ret)
next prev parent reply other threads:[~2022-08-05 21:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 21:33 Christophe JAILLET
2022-08-05 21:49 ` Conor.Dooley [this message]
2022-08-15 15:44 ` Mark Brown
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=e2450741-af74-2cdd-58aa-6483a639306b@microchip.com \
--to=conor.dooley@microchip.com \
--cc=Daire.McNamara@microchip.com \
--cc=broonie@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=yangyingliang@huawei.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
all inboxes | Powered by JetHome®