diff mbox

dmaengine: k3dma: fix sparse warnings

Message ID 52DCF234.9050102@linaro.org
State Accepted
Headers show

Commit Message

Zhangfei Gao Jan. 20, 2014, 9:53 a.m. UTC
-------- Original Message --------
Subject: [PATCH] dmaengine: k3dma: fix sparse warnings
Date: Tue, 14 Jan 2014 11:37:43 +0800
From: Zhangfei Gao <zhangfei.gao@linaro.org>
To: Vinod Koul <vinod.koul@intel.com>
CC: dmaengine@vger.kernel.org, Zhangfei Gao <zhangfei.gao@linaro.org>

Fix sparse warnings:
drivers/dma/k3dma.c:480:20: warning: Using plain integer as NULL pointer
drivers/dma/k3dma.c:820:1: warning: symbol 'k3_dma_pmops' was not 
declared. Should it be static?

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
---
  drivers/dma/k3dma.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

  	for_each_sg(sgl, sg, sglen, i) {
@@ -817,7 +817,7 @@ static int k3_dma_resume(struct device *dev)
  	return 0;
  }

-SIMPLE_DEV_PM_OPS(k3_dma_pmops, k3_dma_suspend, k3_dma_resume);
+static SIMPLE_DEV_PM_OPS(k3_dma_pmops, k3_dma_suspend, k3_dma_resume);

  static struct platform_driver k3_pdma_driver = {
  	.driver		= {
diff mbox

Patch

diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
index e26075408e9b..a1f911aaf220 100644
--- a/drivers/dma/k3dma.c
+++ b/drivers/dma/k3dma.c
@@ -477,7 +477,7 @@  static struct dma_async_tx_descriptor 
*k3_dma_prep_slave_sg(
  	dma_addr_t addr, src = 0, dst = 0;
  	int num = sglen, i;

-	if (sgl == 0)
+	if (sgl == NULL)
  		return NULL;