Skip to content

Commit 5a87f0e

Browse files
andy-shevVinod Koul
authored andcommitted
dma: dw: use %pad instead of casting dma_addr_t
Since we have nice helper to print dma_addr_t values by reference we may use it instead of explicit casting to a longest type. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
1 parent fc61f6b commit 5a87f0e

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

‎drivers/dma/dw/core.c‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,7 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
421421
return;
422422
}
423423

424-
dev_vdbg(chan2dev(&dwc->chan), "%s: llp=0x%llx\n", __func__,
425-
(unsigned long long)llp);
424+
dev_vdbg(chan2dev(&dwc->chan), "%s: llp=%pad\n", __func__, &llp);
426425

427426
list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) {
428427
/* Initial residue value */
@@ -712,9 +711,8 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
712711
u32 ctllo;
713712

714713
dev_vdbg(chan2dev(chan),
715-
"%s: d0x%llx s0x%llx l0x%zx f0x%lx\n", __func__,
716-
(unsigned long long)dest, (unsigned long long)src,
717-
len, flags);
714+
"%s: d%pad s%pad l0x%zx f0x%lx\n", __func__,
715+
&dest, &src, len, flags);
718716

719717
if (unlikely(!len)) {
720718
dev_dbg(chan2dev(chan), "%s: length is zero!\n", __func__);
@@ -1402,9 +1400,9 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,
14021400
/* Let's make a cyclic list */
14031401
last->lli.llp = cdesc->desc[0]->txd.phys;
14041402

1405-
dev_dbg(chan2dev(&dwc->chan), "cyclic prepared buf 0x%llx len %zu "
1406-
"period %zu periods %d\n", (unsigned long long)buf_addr,
1407-
buf_len, period_len, periods);
1403+
dev_dbg(chan2dev(&dwc->chan),
1404+
"cyclic prepared buf %pad len %zu period %zu periods %d\n",
1405+
&buf_addr, buf_len, period_len, periods);
14081406

14091407
cdesc->periods = periods;
14101408
dwc->cdesc = cdesc;

0 commit comments

Comments
 (0)