Commit 3fd38662 authored by Vinod Koul's avatar Vinod Koul
Browse files

dmaengine: coh901318: use correct print specifiers



This driver when compiled on 64 bits gave warnings:

drivers/dma/coh901318.c: In function 'coh901318_list_print':
warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat=]
warning: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'dma_addr_t' [-Wformat=]
warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'dma_addr_t' [-Wformat=]

drivers/dma/coh901318.c: In function 'coh901318_prep_memcpy':
warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat=]
warning: format '%d' expects argument of type 'int', but argument 8 has type 'size_t' [-Wformat=]

We should use %pad to print 'dma_addr_t' values and %zu to print size_t
values

Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 4f5db8c8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1319,10 +1319,10 @@ static void coh901318_list_print(struct coh901318_chan *cohc,
	int i = 0;

	while (l) {
		dev_vdbg(COHC_2_DEV(cohc), "i %d, lli %p, ctrl 0x%x, src 0x%x"
			 ", dst 0x%x, link 0x%x virt_link_addr 0x%p\n",
			 i, l, l->control, l->src_addr, l->dst_addr,
			 l->link_addr, l->virt_link_addr);
		dev_vdbg(COHC_2_DEV(cohc), "i %d, lli %p, ctrl 0x%x, src 0x%pad"
			 ", dst 0x%pad, link 0x%pad virt_link_addr 0x%p\n",
			 i, l, l->control, &l->src_addr, &l->dst_addr,
			 &l->link_addr, l->virt_link_addr);
		i++;
		l = l->virt_link_addr;
	}
@@ -2247,8 +2247,8 @@ coh901318_prep_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
	spin_lock_irqsave(&cohc->lock, flg);

	dev_vdbg(COHC_2_DEV(cohc),
		 "[%s] channel %d src 0x%x dest 0x%x size %d\n",
		 __func__, cohc->id, src, dest, size);
		 "[%s] channel %d src 0x%pad dest 0x%pad size %zu\n",
		 __func__, cohc->id, &src, &dest, size);

	if (flags & DMA_PREP_INTERRUPT)
		/* Trigger interrupt after last lli */