diff mbox

dmaengine: xilinx_dma: Fix error code format specifier

Message ID 20170831113510.7763-1-lars@metafoo.de (mailing list archive)
State Accepted
Headers show

Commit Message

Lars-Peter Clausen Aug. 31, 2017, 11:35 a.m. UTC
'err' is a signed int and error codes are typically negative numbers, so
use '%d' instead of '%u' to format the error code in the error message.

Fixes: ba16db36b5dd ("dmaengine: vdma: Add clock support")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/dma/xilinx/xilinx_dma.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

Comments

Appana Durga Kedareswara Rao Aug. 31, 2017, 12:28 p.m. UTC | #1
> 
> 'err' is a signed int and error codes are typically negative numbers, so use '%d'
> instead of '%u' to format the error code in the error message.
> 
> Fixes: ba16db36b5dd ("dmaengine: vdma: Add clock support")
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Acked-by: Kedareswara rao Appana <appanad@xilinx.com>

> ---
>  drivers/dma/xilinx/xilinx_dma.c | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index 8cf87b1a284b..8722bcba489d 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -2124,7 +2124,7 @@ static int axidma_clk_init(struct platform_device
> *pdev, struct clk **axi_clk,
>  	*axi_clk = devm_clk_get(&pdev->dev, "s_axi_lite_aclk");
>  	if (IS_ERR(*axi_clk)) {
>  		err = PTR_ERR(*axi_clk);
> -		dev_err(&pdev->dev, "failed to get axi_aclk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to get axi_aclk (%d)\n", err);
>  		return err;
>  	}
> 
> @@ -2142,25 +2142,25 @@ static int axidma_clk_init(struct platform_device
> *pdev, struct clk **axi_clk,
> 
>  	err = clk_prepare_enable(*axi_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable axi_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable axi_clk (%d)\n", err);
>  		return err;
>  	}
> 
>  	err = clk_prepare_enable(*tx_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable tx_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable tx_clk (%d)\n", err);
>  		goto err_disable_axiclk;
>  	}
> 
>  	err = clk_prepare_enable(*rx_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable rx_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable rx_clk (%d)\n", err);
>  		goto err_disable_txclk;
>  	}
> 
>  	err = clk_prepare_enable(*sg_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable sg_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable sg_clk (%d)\n", err);
>  		goto err_disable_rxclk;
>  	}
> 
> @@ -2189,26 +2189,26 @@ static int axicdma_clk_init(struct platform_device
> *pdev, struct clk **axi_clk,
>  	*axi_clk = devm_clk_get(&pdev->dev, "s_axi_lite_aclk");
>  	if (IS_ERR(*axi_clk)) {
>  		err = PTR_ERR(*axi_clk);
> -		dev_err(&pdev->dev, "failed to get axi_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to get axi_clk (%d)\n", err);
>  		return err;
>  	}
> 
>  	*dev_clk = devm_clk_get(&pdev->dev, "m_axi_aclk");
>  	if (IS_ERR(*dev_clk)) {
>  		err = PTR_ERR(*dev_clk);
> -		dev_err(&pdev->dev, "failed to get dev_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to get dev_clk (%d)\n", err);
>  		return err;
>  	}
> 
>  	err = clk_prepare_enable(*axi_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable axi_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable axi_clk (%d)\n", err);
>  		return err;
>  	}
> 
>  	err = clk_prepare_enable(*dev_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable dev_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable dev_clk (%d)\n", err);
>  		goto err_disable_axiclk;
>  	}
> 
> @@ -2229,7 +2229,7 @@ static int axivdma_clk_init(struct platform_device
> *pdev, struct clk **axi_clk,
>  	*axi_clk = devm_clk_get(&pdev->dev, "s_axi_lite_aclk");
>  	if (IS_ERR(*axi_clk)) {
>  		err = PTR_ERR(*axi_clk);
> -		dev_err(&pdev->dev, "failed to get axi_aclk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to get axi_aclk (%d)\n", err);
>  		return err;
>  	}
> 
> @@ -2251,31 +2251,31 @@ static int axivdma_clk_init(struct platform_device
> *pdev, struct clk **axi_clk,
> 
>  	err = clk_prepare_enable(*axi_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable axi_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable axi_clk (%d)\n", err);
>  		return err;
>  	}
> 
>  	err = clk_prepare_enable(*tx_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable tx_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable tx_clk (%d)\n", err);
>  		goto err_disable_axiclk;
>  	}
> 
>  	err = clk_prepare_enable(*txs_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable txs_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable txs_clk (%d)\n", err);
>  		goto err_disable_txclk;
>  	}
> 
>  	err = clk_prepare_enable(*rx_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable rx_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable rx_clk (%d)\n", err);
>  		goto err_disable_txsclk;
>  	}
> 
>  	err = clk_prepare_enable(*rxs_clk);
>  	if (err) {
> -		dev_err(&pdev->dev, "failed to enable rxs_clk (%u)\n", err);
> +		dev_err(&pdev->dev, "failed to enable rxs_clk (%d)\n", err);
>  		goto err_disable_rxclk;
>  	}
> 
> --
> 2.11.0

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul Sept. 5, 2017, 3:33 a.m. UTC | #2
On Thu, Aug 31, 2017 at 01:35:10PM +0200, Lars-Peter Clausen wrote:
> 'err' is a signed int and error codes are typically negative numbers, so
> use '%d' instead of '%u' to format the error code in the error message.

Applied, thanks
diff mbox

Patch

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 8cf87b1a284b..8722bcba489d 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -2124,7 +2124,7 @@  static int axidma_clk_init(struct platform_device *pdev, struct clk **axi_clk,
 	*axi_clk = devm_clk_get(&pdev->dev, "s_axi_lite_aclk");
 	if (IS_ERR(*axi_clk)) {
 		err = PTR_ERR(*axi_clk);
-		dev_err(&pdev->dev, "failed to get axi_aclk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to get axi_aclk (%d)\n", err);
 		return err;
 	}
 
@@ -2142,25 +2142,25 @@  static int axidma_clk_init(struct platform_device *pdev, struct clk **axi_clk,
 
 	err = clk_prepare_enable(*axi_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable axi_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable axi_clk (%d)\n", err);
 		return err;
 	}
 
 	err = clk_prepare_enable(*tx_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable tx_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable tx_clk (%d)\n", err);
 		goto err_disable_axiclk;
 	}
 
 	err = clk_prepare_enable(*rx_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable rx_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable rx_clk (%d)\n", err);
 		goto err_disable_txclk;
 	}
 
 	err = clk_prepare_enable(*sg_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable sg_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable sg_clk (%d)\n", err);
 		goto err_disable_rxclk;
 	}
 
@@ -2189,26 +2189,26 @@  static int axicdma_clk_init(struct platform_device *pdev, struct clk **axi_clk,
 	*axi_clk = devm_clk_get(&pdev->dev, "s_axi_lite_aclk");
 	if (IS_ERR(*axi_clk)) {
 		err = PTR_ERR(*axi_clk);
-		dev_err(&pdev->dev, "failed to get axi_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to get axi_clk (%d)\n", err);
 		return err;
 	}
 
 	*dev_clk = devm_clk_get(&pdev->dev, "m_axi_aclk");
 	if (IS_ERR(*dev_clk)) {
 		err = PTR_ERR(*dev_clk);
-		dev_err(&pdev->dev, "failed to get dev_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to get dev_clk (%d)\n", err);
 		return err;
 	}
 
 	err = clk_prepare_enable(*axi_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable axi_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable axi_clk (%d)\n", err);
 		return err;
 	}
 
 	err = clk_prepare_enable(*dev_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable dev_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable dev_clk (%d)\n", err);
 		goto err_disable_axiclk;
 	}
 
@@ -2229,7 +2229,7 @@  static int axivdma_clk_init(struct platform_device *pdev, struct clk **axi_clk,
 	*axi_clk = devm_clk_get(&pdev->dev, "s_axi_lite_aclk");
 	if (IS_ERR(*axi_clk)) {
 		err = PTR_ERR(*axi_clk);
-		dev_err(&pdev->dev, "failed to get axi_aclk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to get axi_aclk (%d)\n", err);
 		return err;
 	}
 
@@ -2251,31 +2251,31 @@  static int axivdma_clk_init(struct platform_device *pdev, struct clk **axi_clk,
 
 	err = clk_prepare_enable(*axi_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable axi_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable axi_clk (%d)\n", err);
 		return err;
 	}
 
 	err = clk_prepare_enable(*tx_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable tx_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable tx_clk (%d)\n", err);
 		goto err_disable_axiclk;
 	}
 
 	err = clk_prepare_enable(*txs_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable txs_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable txs_clk (%d)\n", err);
 		goto err_disable_txclk;
 	}
 
 	err = clk_prepare_enable(*rx_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable rx_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable rx_clk (%d)\n", err);
 		goto err_disable_txsclk;
 	}
 
 	err = clk_prepare_enable(*rxs_clk);
 	if (err) {
-		dev_err(&pdev->dev, "failed to enable rxs_clk (%u)\n", err);
+		dev_err(&pdev->dev, "failed to enable rxs_clk (%d)\n", err);
 		goto err_disable_rxclk;
 	}