diff mbox series

[1/2] dma: Reduce error level when DMA channel type does not exist

Message ID 20200917112308.7736-2-vigneshr@ti.com
State Awaiting Upstream
Delegated to: Stefan Roese
Headers show
Series mtd: cfi_mtd: Add DMA support for reads | expand

Commit Message

Vignesh Raghavendra Sept. 17, 2020, 11:23 a.m. UTC
Caller would need gracefully handle failures of dma_get_device(),
therefore reduce pr_err() to pr_debug() when DMA device is not found.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 drivers/dma/dma-uclass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefan Roese Sept. 23, 2020, 6:58 a.m. UTC | #1
On 17.09.20 13:23, Vignesh Raghavendra wrote:
> Caller would need gracefully handle failures of dma_get_device(),
> therefore reduce pr_err() to pr_debug() when DMA device is not found.
> 
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   drivers/dma/dma-uclass.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
> index 8cbb364042..50403148d6 100644
> --- a/drivers/dma/dma-uclass.c
> +++ b/drivers/dma/dma-uclass.c
> @@ -219,8 +219,8 @@ int dma_get_device(u32 transfer_type, struct udevice **devp)
>   	}
>   
>   	if (!dev) {
> -		pr_err("No DMA device found that supports %x type\n",
> -		      transfer_type);
> +		pr_debug("No DMA device found that supports %x type\n",
> +			 transfer_type);
>   		return -EPROTONOSUPPORT;
>   	}
>   
> 


Viele Grüße,
Stefan
Stefan Roese Oct. 8, 2020, 7:08 a.m. UTC | #2
On 17.09.20 13:23, Vignesh Raghavendra wrote:
> Caller would need gracefully handle failures of dma_get_device(),
> therefore reduce pr_err() to pr_debug() when DMA device is not found.
> 
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>

Applied to u-boot-cfi-flash/master

Thanks,
Stefan

> ---
>   drivers/dma/dma-uclass.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
> index 8cbb364042..50403148d6 100644
> --- a/drivers/dma/dma-uclass.c
> +++ b/drivers/dma/dma-uclass.c
> @@ -219,8 +219,8 @@ int dma_get_device(u32 transfer_type, struct udevice **devp)
>   	}
>   
>   	if (!dev) {
> -		pr_err("No DMA device found that supports %x type\n",
> -		      transfer_type);
> +		pr_debug("No DMA device found that supports %x type\n",
> +			 transfer_type);
>   		return -EPROTONOSUPPORT;
>   	}
>   
> 


Viele Grüße,
Stefan
diff mbox series

Patch

diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index 8cbb364042..50403148d6 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -219,8 +219,8 @@  int dma_get_device(u32 transfer_type, struct udevice **devp)
 	}
 
 	if (!dev) {
-		pr_err("No DMA device found that supports %x type\n",
-		      transfer_type);
+		pr_debug("No DMA device found that supports %x type\n",
+			 transfer_type);
 		return -EPROTONOSUPPORT;
 	}