aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2014-11-06 07:32:52 -0500
committerVinod Koul <vinod.koul@intel.com>2014-11-17 03:35:02 -0500
commit82e2424635f4c0d9af6670638889be81f56ea225 (patch)
tree5b723ae282c7f8f0de619b501a5706c1e44762cc /drivers/dma
parentc66ec04ed73c2355fa17e8d114808eea90d95711 (diff)
dmaengine: xdmac: fix print warning on dma_addr_t variable
As documented in printk-formats.txt the dma_addr_t should be printed with %pad specfiers. This way it works on all archs. make.cross ARCH=s390 All warnings: drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_slave_sg': >> drivers/dma/at_xdmac.c:621:3: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), ^ >> drivers/dma/at_xdmac.c:621:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] >> drivers/dma/at_xdmac.c:628:4: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), ^ drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_dma_cyclic': >> drivers/dma/at_xdmac.c:663:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), "%s: buf_addr=0x%08x, buf_len=%d, period_len=%d, dir=%s, flags=0x%lx\n", ^ >> drivers/dma/at_xdmac.c:690:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), ^ >> drivers/dma/at_xdmac.c:709:3: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), ^ >> drivers/dma/at_xdmac.c:709:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] >> drivers/dma/at_xdmac.c:716:4: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), >> drivers/dma/at_xdmac.c:731:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), ^ drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_dma_memcpy': >> drivers/dma/at_xdmac.c:765:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), "%s: src=0x%08x, dest=0x%08x, len=%d, flags=0x%lx\n", ^ >> drivers/dma/at_xdmac.c:765:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), "%s: remaining_size=%u\n", __func__, remaining_size); ^ >> drivers/dma/at_xdmac.c:845:3: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), ^ >> drivers/dma/at_xdmac.c:845:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] >> drivers/dma/at_xdmac.c:852:4: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), ^ drivers/dma/at_xdmac.c: In function 'at_xdmac_tx_status': >> drivers/dma/at_xdmac.c:929:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] dev_dbg(chan2dev(chan), Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/at_xdmac.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 0f947c8774bf..89c43be20a38 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -619,15 +619,15 @@ at_xdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
619 | (i == sg_len - 1 ? 0 : AT_XDMAC_MBR_UBC_NDE) /* descriptor fetch */ 619 | (i == sg_len - 1 ? 0 : AT_XDMAC_MBR_UBC_NDE) /* descriptor fetch */
620 | len / (1 << at_xdmac_get_dwidth(cfg)); /* microblock length */ 620 | len / (1 << at_xdmac_get_dwidth(cfg)); /* microblock length */
621 dev_dbg(chan2dev(chan), 621 dev_dbg(chan2dev(chan),
622 "%s: lld: mbr_sa=0x%08x, mbr_da=0x%08x, mbr_ubc=0x%08x\n", 622 "%s: lld: mbr_sa=%pad, mbr_da=%pad, mbr_ubc=0x%08x\n",
623 __func__, desc->lld.mbr_sa, desc->lld.mbr_da, desc->lld.mbr_ubc); 623 __func__, &desc->lld.mbr_sa, &desc->lld.mbr_da, desc->lld.mbr_ubc);
624 624
625 /* Chain lld. */ 625 /* Chain lld. */
626 if (prev) { 626 if (prev) {
627 prev->lld.mbr_nda = desc->tx_dma_desc.phys; 627 prev->lld.mbr_nda = desc->tx_dma_desc.phys;
628 dev_dbg(chan2dev(chan), 628 dev_dbg(chan2dev(chan),
629 "%s: chain lld: prev=0x%p, mbr_nda=0x%08x\n", 629 "%s: chain lld: prev=0x%p, mbr_nda=%pad\n",
630 __func__, prev, prev->lld.mbr_nda); 630 __func__, prev, &prev->lld.mbr_nda);
631 } 631 }
632 632
633 prev = desc; 633 prev = desc;
@@ -660,8 +660,8 @@ 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=%zd, period_len=%zd, dir=%s, flags=0x%lx\n", 663 dev_dbg(chan2dev(chan), "%s: buf_addr=%pad, 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
667 if (!is_slave_direction(direction)) { 667 if (!is_slave_direction(direction)) {
@@ -688,8 +688,8 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
688 } 688 }
689 spin_unlock_bh(&atchan->lock); 689 spin_unlock_bh(&atchan->lock);
690 dev_dbg(chan2dev(chan), 690 dev_dbg(chan2dev(chan),
691 "%s: desc=0x%p, tx_dma_desc.phys=0x%08x\n", 691 "%s: desc=0x%p, tx_dma_desc.phys=%pad\n",
692 __func__, desc, desc->tx_dma_desc.phys); 692 __func__, desc, &desc->tx_dma_desc.phys);
693 693
694 if (direction == DMA_DEV_TO_MEM) { 694 if (direction == DMA_DEV_TO_MEM) {
695 desc->lld.mbr_sa = atchan->per_src_addr; 695 desc->lld.mbr_sa = atchan->per_src_addr;
@@ -707,15 +707,15 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
707 | period_len >> at_xdmac_get_dwidth(cfg); 707 | period_len >> at_xdmac_get_dwidth(cfg);
708 708
709 dev_dbg(chan2dev(chan), 709 dev_dbg(chan2dev(chan),
710 "%s: lld: mbr_sa=0x%08x, mbr_da=0x%08x, mbr_ubc=0x%08x\n", 710 "%s: lld: mbr_sa=%pad, mbr_da=%pad, mbr_ubc=0x%08x\n",
711 __func__, desc->lld.mbr_sa, desc->lld.mbr_da, desc->lld.mbr_ubc); 711 __func__, &desc->lld.mbr_sa, &desc->lld.mbr_da, desc->lld.mbr_ubc);
712 712
713 /* Chain lld. */ 713 /* Chain lld. */
714 if (prev) { 714 if (prev) {
715 prev->lld.mbr_nda = desc->tx_dma_desc.phys; 715 prev->lld.mbr_nda = desc->tx_dma_desc.phys;
716 dev_dbg(chan2dev(chan), 716 dev_dbg(chan2dev(chan),
717 "%s: chain lld: prev=0x%p, mbr_nda=0x%08x\n", 717 "%s: chain lld: prev=0x%p, mbr_nda=%pad\n",
718 __func__, prev, prev->lld.mbr_nda); 718 __func__, prev, &prev->lld.mbr_nda);
719 } 719 }
720 720
721 prev = desc; 721 prev = desc;
@@ -729,8 +729,8 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
729 729
730 prev->lld.mbr_nda = first->tx_dma_desc.phys; 730 prev->lld.mbr_nda = first->tx_dma_desc.phys;
731 dev_dbg(chan2dev(chan), 731 dev_dbg(chan2dev(chan),
732 "%s: chain lld: prev=0x%p, mbr_nda=0x%08x\n", 732 "%s: chain lld: prev=0x%p, mbr_nda=%pad\n",
733 __func__, prev, prev->lld.mbr_nda); 733 __func__, prev, &prev->lld.mbr_nda);
734 first->tx_dma_desc.flags = flags; 734 first->tx_dma_desc.flags = flags;
735 first->xfer_size = buf_len; 735 first->xfer_size = buf_len;
736 first->direction = direction; 736 first->direction = direction;
@@ -762,8 +762,8 @@ 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=%zd, flags=0x%lx\n", 765 dev_dbg(chan2dev(chan), "%s: src=%pad, dest=%pad, 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))
769 return NULL; 769 return NULL;
@@ -843,8 +843,8 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
843 desc->lld.mbr_cfg = chan_cc; 843 desc->lld.mbr_cfg = chan_cc;
844 844
845 dev_dbg(chan2dev(chan), 845 dev_dbg(chan2dev(chan),
846 "%s: lld: mbr_sa=0x%08x, mbr_da=0x%08x, mbr_ubc=0x%08x, mbr_cfg=0x%08x\n", 846 "%s: lld: mbr_sa=%pad, mbr_da=%pad, mbr_ubc=0x%08x, mbr_cfg=0x%08x\n",
847 __func__, desc->lld.mbr_sa, desc->lld.mbr_da, desc->lld.mbr_ubc, desc->lld.mbr_cfg); 847 __func__, &desc->lld.mbr_sa, &desc->lld.mbr_da, desc->lld.mbr_ubc, desc->lld.mbr_cfg);
848 848
849 /* Chain lld. */ 849 /* Chain lld. */
850 if (prev) { 850 if (prev) {
@@ -927,8 +927,8 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
927 dma_set_residue(txstate, residue); 927 dma_set_residue(txstate, residue);
928 928
929 dev_dbg(chan2dev(chan), 929 dev_dbg(chan2dev(chan),
930 "%s: desc=0x%p, tx_dma_desc.phys=0x%08x, tx_status=%d, cookie=%d, residue=%d\n", 930 "%s: desc=0x%p, tx_dma_desc.phys=%pad, tx_status=%d, cookie=%d, residue=%d\n",
931 __func__, desc, desc->tx_dma_desc.phys, ret, cookie, residue); 931 __func__, desc, &desc->tx_dma_desc.phys, ret, cookie, residue);
932 932
933 return ret; 933 return ret;
934} 934}