* [PATCH] spi: microchip-core: Simplify some error message
@ 2022-08-05 21:33 Christophe JAILLET
2022-08-05 21:49 ` Conor.Dooley
2022-08-15 15:44 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2022-08-05 21:33 UTC (permalink / raw)
To: Conor Dooley, Daire McNamara, Mark Brown, Yang Yingliang
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-riscv,
linux-spi
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>
---
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)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: microchip-core: Simplify some error message
2022-08-05 21:33 [PATCH] spi: microchip-core: Simplify some error message Christophe JAILLET
@ 2022-08-05 21:49 ` Conor.Dooley
2022-08-15 15:44 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Conor.Dooley @ 2022-08-05 21:49 UTC (permalink / raw)
To: christophe.jaillet, Conor.Dooley, Daire.McNamara, broonie, yangyingliang
Cc: linux-kernel, kernel-janitors, linux-riscv, linux-spi
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: microchip-core: Simplify some error message
2022-08-05 21:33 [PATCH] spi: microchip-core: Simplify some error message Christophe JAILLET
2022-08-05 21:49 ` Conor.Dooley
@ 2022-08-15 15:44 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-08-15 15:44 UTC (permalink / raw)
To: Yang Yingliang, Christophe JAILLET, Daire McNamara, Conor Dooley
Cc: linux-kernel, linux-riscv, kernel-janitors, linux-spi
On Fri, 5 Aug 2022 23:33:17 +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.
>
> Moreover, in the case of devm_clk_get() it would only display '0' because
> 'ret' is know to be 0 at this point.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: microchip-core: Simplify some error message
commit: 7964e817d2311b37b86d6fbf588cd9fbe747b108
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-15 15:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 21:33 [PATCH] spi: microchip-core: Simplify some error message Christophe JAILLET
2022-08-05 21:49 ` Conor.Dooley
2022-08-15 15:44 ` Mark Brown
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).