Re: [PATCH 08/11] spi: stm32: Simplify with dev_err_probe()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH 08/11] spi: stm32: Simplify with dev_err_probe()
- From: Alain Volmat <alain.volmat@xxxxxx>
- Date: Tue, 8 Sep 2020 15:53:33 +0200
- Cc: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>, Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>, Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx>, Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx>, Florian Fainelli <f.fainelli@xxxxxxxxx>, Ray Jui <rjui@xxxxxxxxxxxx>, Scott Branden <sbranden@xxxxxxxxxxxx>, "bcm-kernel-feedback-list@xxxxxxxxxxxx" <bcm-kernel-feedback-list@xxxxxxxxxxxx>, Andy Gross <agross@xxxxxxxxxx>, Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>, Orson Zhai <orsonzhai@xxxxxxxxx>, Baolin Wang <baolin.wang7@xxxxxxxxx>, Chunyan Zhang <zhang.lyra@xxxxxxxxx>, Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>, Alexandre TORGUE <alexandre.torgue@xxxxxx>, Masahisa Kojima <masahisa.kojima@xxxxxxxxxx>, Jassi Brar <jaswinder.singh@xxxxxxxxxx>, Laxman Dewangan <ldewangan@xxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Jonathan Hunter <jonathanh@xxxxxxxxxx>, "linux-spi@xxxxxxxxxxxxxxx" <linux-spi@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx" <linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-arm-msm@xxxxxxxxxxxxxxx" <linux-arm-msm@xxxxxxxxxxxxxxx>, "linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx" <linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, "linux-tegra@xxxxxxxxxxxxxxx" <linux-tegra@xxxxxxxxxxxxxxx>
- In-reply-to: <20200901152713.18629-8-krzk@kernel.org>
- Mail-followup-to: Krzysztof Kozlowski <krzk@xxxxxxxxxx>, Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>, Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>, Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx>, Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx>, Florian Fainelli <f.fainelli@xxxxxxxxx>, Ray Jui <rjui@xxxxxxxxxxxx>, Scott Branden <sbranden@xxxxxxxxxxxx>, "bcm-kernel-feedback-list@xxxxxxxxxxxx" <bcm-kernel-feedback-list@xxxxxxxxxxxx>, Andy Gross <agross@xxxxxxxxxx>, Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>, Orson Zhai <orsonzhai@xxxxxxxxx>, Baolin Wang <baolin.wang7@xxxxxxxxx>, Chunyan Zhang <zhang.lyra@xxxxxxxxx>, Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>, Alexandre TORGUE <alexandre.torgue@xxxxxx>, Masahisa Kojima <masahisa.kojima@xxxxxxxxxx>, Jassi Brar <jaswinder.singh@xxxxxxxxxx>, Laxman Dewangan <ldewangan@xxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Jonathan Hunter <jonathanh@xxxxxxxxxx>, "linux-spi@xxxxxxxxxxxxxxx" <linux-spi@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx" <linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-arm-msm@xxxxxxxxxxxxxxx" <linux-arm-msm@xxxxxxxxxxxxxxx>, "linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx" <linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, "linux-tegra@xxxxxxxxxxxxxxx" <linux-tegra@xxxxxxxxxxxxxxx>
- References: <20200901152713.18629-1-krzk@kernel.org> <20200901152713.18629-8-krzk@kernel.org>
On Tue, Sep 01, 2020 at 03:27:10PM +0000, Krzysztof Kozlowski wrote:
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe(). Less code and the error value gets printed.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Reviewed-by: Alain Volmat <alain.volmat@xxxxxx>
> ---
> drivers/spi/spi-stm32.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
> index d4b33b358a31..f0e594b2fee4 100644
> --- a/drivers/spi/spi-stm32.c
> +++ b/drivers/spi/spi-stm32.c
> @@ -1857,9 +1857,7 @@ static int stm32_spi_probe(struct platform_device *pdev)
>
> spi->irq = platform_get_irq(pdev, 0);
> if (spi->irq <= 0) {
> - ret = spi->irq;
> - if (ret != -EPROBE_DEFER)
> - dev_err(&pdev->dev, "failed to get irq: %d\n", ret);
> + ret = dev_err_probe(&pdev->dev, spi->irq, "failed to get irq\n");
> goto err_master_put;
> }
> ret = devm_request_threaded_irq(&pdev->dev, spi->irq,
> --
> 2.17.1
>
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|