MLK-15135-1: dma: imx-sdma: fix build warning on aarch64
authorRobin Gong <yibin.gong@nxp.com>
Wed, 21 Jun 2017 09:04:40 +0000 (17:04 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:28:31 +0000 (15:28 -0500)
fix below build warning with aarch64:
drivers/dma/imx-sdma.c: In function ‘sdma_prep_dma_cyclic’:
drivers/dma/imx-sdma.c:1727:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
   dev_dbg(sdma->dev, "entry %d: count: %d dma: %pad %s%s\n",

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
drivers/dma/imx-sdma.c

index a8fc643..0bf204a 100644 (file)
@@ -8,6 +8,7 @@
  * Based on code from Freescale:
  *
  * Copyright 2004-2016 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2017 NXP.
  *
  * The code contained herein is licensed under the GNU General Public
  * License. You may obtain a copy of the GNU General Public License
@@ -1541,7 +1542,7 @@ static struct dma_async_tx_descriptor *sdma_prep_memcpy(
                        param &= ~BD_CONT;
                }
 
-               dev_dbg(sdma->dev, "entry %d: count: %d dma: 0x%u %s%s\n",
+               dev_dbg(sdma->dev, "entry %d: count: %zd dma: 0x%x %s%s\n",
                                i, count, bd->buffer_addr,
                                param & BD_WRAP ? "wrap" : "",
                                param & BD_INTR ? " intr" : "");
@@ -1724,7 +1725,7 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
                if (i + 1 == num_periods)
                        param |= BD_WRAP;
 
-               dev_dbg(sdma->dev, "entry %d: count: %d dma: %pad %s%s\n",
+               dev_dbg(sdma->dev, "entry %d: count: %zd dma: %pad %s%s\n",
                                i, period_len, &dma_addr,
                                param & BD_WRAP ? "wrap" : "",
                                param & BD_INTR ? " intr" : "");