diff mbox

[v2,17/30] dmaengine: mmp_tdma: use correct print specifiers for size_t

Message ID 1474361960-12434-18-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Vinod Koul Sept. 20, 2016, 8:59 a.m. UTC
This driver warns:

drivers/dma/mmp_tdma.c: In function 'mmp_tdma_prep_dma_cyclic':
drivers/dma/mmp_tdma.c:437:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]

We should use %zu to print 'size_t' values.

Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/mmp_tdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zhangfei Gao Sept. 22, 2016, 2:44 a.m. UTC | #1
On 2016年09月20日 16:59, Vinod Koul wrote:
> This driver warns:
>
> drivers/dma/mmp_tdma.c: In function 'mmp_tdma_prep_dma_cyclic':
> drivers/dma/mmp_tdma.c:437:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]
>
> We should use %zu to print 'size_t' values.
>
> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org>

Thanks
--
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
diff mbox

Patch

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index b3441f57a364..d7422b1bf406 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -433,7 +433,7 @@  static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic(
 
 	if (period_len > TDMA_MAX_XFER_BYTES) {
 		dev_err(tdmac->dev,
-				"maximum period size exceeded: %d > %d\n",
+				"maximum period size exceeded: %zu > %d\n",
 				period_len, TDMA_MAX_XFER_BYTES);
 		goto err_out;
 	}