Skip to content

Commit

Permalink
dmaengine: ep93xx: use correct print specifiers for size_t
Browse files Browse the repository at this point in the history
This driver warns:

drivers/dma/ep93xx_dma.c: In function 'ep93xx_dma_prep_slave_sg':
drivers/dma/ep93xx_dma.c:1054:6: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]

drivers/dma/ep93xx_dma.c: In function 'ep93xx_dma_prep_dma_cyclic':
drivers/dma/ep93xx_dma.c:1129:5: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]

We should use %zu to print 'size_t' values.

Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
Vinod Koul committed Sep 26, 2016
1 parent 6947c3f commit 567df5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/dma/ep93xx_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ ep93xx_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
size_t sg_len = sg_dma_len(sg);

if (sg_len > DMA_MAX_CHAN_BYTES) {
dev_warn(chan2dev(edmac), "too big transfer size %d\n",
dev_warn(chan2dev(edmac), "too big transfer size %zu\n",
sg_len);
goto fail;
}
Expand Down Expand Up @@ -1125,7 +1125,7 @@ ep93xx_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
}

if (period_len > DMA_MAX_CHAN_BYTES) {
dev_warn(chan2dev(edmac), "too big period length %d\n",
dev_warn(chan2dev(edmac), "too big period length %zu\n",
period_len);
return NULL;
}
Expand Down

0 comments on commit 567df5e

Please sign in to comment.