diff options
author | Vinod Koul <vinod.koul@intel.com> | 2014-11-06 07:07:48 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-11-17 03:35:02 -0500 |
commit | c66ec04ed73c2355fa17e8d114808eea90d95711 (patch) | |
tree | c6f42c9136206b0ac456fab198ee51d460463ead | |
parent | 2abd4198090fbe88af653a4a0be3735d286356b2 (diff) |
dmaengine: xdmac: fix print warning on size_t variable
As documented in printk-formats.txt the size_t should be printed with
%zu/%zd specfiers. This way it works on all archs.
make.cross ARCH=avr32
All warnings:
drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_dma_cyclic':
>> drivers/dma/at_xdmac.c:663: warning: format '%d' expects type 'int', but argument 6 has type 'size_t'
>> drivers/dma/at_xdmac.c:663: warning: format '%d' expects type 'int', but argument 7 has type 'size_t'
drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_dma_memcpy':
>> drivers/dma/at_xdmac.c:765: warning: format '%d' expects type 'int', but argument 7 has type 'size_t'
>> drivers/dma/at_xdmac.c:794: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
>> drivers/dma/at_xdmac.c:815: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/at_xdmac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 44f212de5200..0f947c8774bf 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c | |||
@@ -660,7 +660,7 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, | |||
660 | int i; | 660 | int i; |
661 | u32 cfg; | 661 | u32 cfg; |
662 | 662 | ||
663 | dev_dbg(chan2dev(chan), "%s: buf_addr=0x%08x, buf_len=%d, period_len=%d, dir=%s, flags=0x%lx\n", | 663 | dev_dbg(chan2dev(chan), "%s: buf_addr=0x%08x, buf_len=%zd, period_len=%zd, dir=%s, flags=0x%lx\n", |
664 | __func__, buf_addr, buf_len, period_len, | 664 | __func__, buf_addr, buf_len, period_len, |
665 | direction == DMA_MEM_TO_DEV ? "mem2per" : "per2mem", flags); | 665 | direction == DMA_MEM_TO_DEV ? "mem2per" : "per2mem", flags); |
666 | 666 | ||
@@ -762,7 +762,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, | |||
762 | | AT_XDMAC_CC_MBSIZE_SIXTEEN | 762 | | AT_XDMAC_CC_MBSIZE_SIXTEEN |
763 | | AT_XDMAC_CC_TYPE_MEM_TRAN; | 763 | | AT_XDMAC_CC_TYPE_MEM_TRAN; |
764 | 764 | ||
765 | dev_dbg(chan2dev(chan), "%s: src=0x%08x, dest=0x%08x, len=%d, flags=0x%lx\n", | 765 | dev_dbg(chan2dev(chan), "%s: src=0x%08x, dest=0x%08x, len=%zd, flags=0x%lx\n", |
766 | __func__, src, dest, len, flags); | 766 | __func__, src, dest, len, flags); |
767 | 767 | ||
768 | if (unlikely(!len)) | 768 | if (unlikely(!len)) |
@@ -791,7 +791,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, | |||
791 | while (remaining_size) { | 791 | while (remaining_size) { |
792 | struct at_xdmac_desc *desc = NULL; | 792 | struct at_xdmac_desc *desc = NULL; |
793 | 793 | ||
794 | dev_dbg(chan2dev(chan), "%s: remaining_size=%u\n", __func__, remaining_size); | 794 | dev_dbg(chan2dev(chan), "%s: remaining_size=%zu\n", __func__, remaining_size); |
795 | 795 | ||
796 | spin_lock_bh(&atchan->lock); | 796 | spin_lock_bh(&atchan->lock); |
797 | desc = at_xdmac_get_desc(atchan); | 797 | desc = at_xdmac_get_desc(atchan); |
@@ -812,7 +812,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, | |||
812 | else | 812 | else |
813 | xfer_size = remaining_size; | 813 | xfer_size = remaining_size; |
814 | 814 | ||
815 | dev_dbg(chan2dev(chan), "%s: xfer_size=%u\n", __func__, xfer_size); | 815 | dev_dbg(chan2dev(chan), "%s: xfer_size=%zu\n", __func__, xfer_size); |
816 | 816 | ||
817 | /* Check remaining length and change data width if needed. */ | 817 | /* Check remaining length and change data width if needed. */ |
818 | if (!((src_addr | dst_addr | xfer_size) & 7)) { | 818 | if (!((src_addr | dst_addr | xfer_size) & 7)) { |