Re: [PATCH 1/1] spi: spi-imx: Use dev_err_probe for failed DMA channel requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

gentle ping.

Alexander

Am Dienstag, 18. April 2023, 10:35:05 CEST schrieb Alexander Stein:
> If dma_request_chan() fails, no error is shown nor any information is
> shown in /sys/kernel/debug/devices_deferred if -EPROBE_DEFER is returned.
> Use dev_err_probe to fix both problems.
> 
> Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>
> ---
> With this patch applied /sys/kernel/debug/devices_deferred actually
> shows these lines on my platform:
> 30820000.spi    spi_imx: can't get the TX DMA channel!
> 30830000.spi    spi_imx: can't get the TX DMA channel!
> 
>  drivers/spi/spi-imx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
> index 34e5f81ec431e..b23325a3bb667 100644
> --- a/drivers/spi/spi-imx.c
> +++ b/drivers/spi/spi-imx.c
> @@ -1318,7 +1318,7 @@ static int spi_imx_sdma_init(struct device *dev,
> struct spi_imx_data *spi_imx, controller->dma_tx = dma_request_chan(dev,
> "tx");
>  	if (IS_ERR(controller->dma_tx)) {
>  		ret = PTR_ERR(controller->dma_tx);
> -		dev_dbg(dev, "can't get the TX DMA channel, error %d!\n", 
ret);
> +		dev_err_probe(dev, ret, "can't get the TX DMA channel!
\n");
>  		controller->dma_tx = NULL;
>  		goto err;
>  	}
> @@ -1327,7 +1327,7 @@ static int spi_imx_sdma_init(struct device *dev,
> struct spi_imx_data *spi_imx, controller->dma_rx = dma_request_chan(dev,
> "rx");
>  	if (IS_ERR(controller->dma_rx)) {
>  		ret = PTR_ERR(controller->dma_rx);
> -		dev_dbg(dev, "can't get the RX DMA channel, error %d\n", 
ret);
> +		dev_err_probe(dev, ret, "can't get the RX DMA channel!
\n");
>  		controller->dma_rx = NULL;
>  		goto err;
>  	}


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/






[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]

  Powered by Linux