diff mbox

dmaengine: mxs: Use %zu for printing a size_t variable

Message ID 1497193391-4887-1-git-send-email-festevam@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Fabio Estevam June 11, 2017, 3:03 p.m. UTC
From: Fabio Estevam <fabio.estevam@nxp.com>

Use %zu for printing a size_t variable in order to fix the following
build warning:

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

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
This buid warning happened after the patch 
"dmaengine: Kconfig: Extend the dependency for MXS_DMA" is applied as it
adds COMPILE_TEST and allows this driver to be built for other architecture.

 drivers/dma/mxs-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul June 15, 2017, 4:18 a.m. UTC | #1
On Sun, Jun 11, 2017 at 12:03:11PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> Use %zu for printing a size_t variable in order to fix the following
> build warning:
> 
> drivers/dma/mxs-dma.c: In function 'mxs_dma_prep_dma_cyclic':
> drivers/dma/mxs-dma.c:621:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat]

Applied this first, thanks
diff mbox

Patch

diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index e217268..41d1679 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -617,7 +617,7 @@  static struct dma_async_tx_descriptor *mxs_dma_prep_dma_cyclic(
 
 	if (period_len > MAX_XFER_BYTES) {
 		dev_err(mxs_dma->dma_device.dev,
-				"maximum period size exceeded: %d > %d\n",
+				"maximum period size exceeded: %zu > %d\n",
 				period_len, MAX_XFER_BYTES);
 		goto err_out;
 	}