The pl330_tx_status() function returns the desc->status if the dma_cookie_status() call does indicate the cookie completed, however the desc->status is not look directly compatible. Sparse throws the following warning: pl330.c:2262:35: warning: mixing different enum types pl330.c:2262:35: int enum desc_status versus pl330.c:2262:35: int enum dma_status Attempt to fix this by adding a switch statement to turn the desc->status into a dma_status. Note, this has only been tested with the dmatest suite. Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx> -- Vinod Koul <vinod.koul@xxxxxxxxx> Dan Williams <dan.j.williams@xxxxxxxxx> DMA List <dmaengine@xxxxxxxxxxxxxxx> Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx> Jassi Brar <jassisinghbrar@xxxxxxxxx> Liviu Dudau <Liviu.Dudau@xxxxxxx> Linux ARM Kernel <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx> --- drivers/dma/pl330.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index d6f677e..a7d9d30 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2259,7 +2259,17 @@ pl330_tx_status(struct dma_chan *chan, dma_cookie_t cookie, transferred = 0; residual += desc->bytes_requested - transferred; if (desc->txd.cookie == cookie) { - ret = desc->status; + switch (desc->status) { + case DONE: + ret = DMA_COMPLETE; + break; + case PREP: + case BUSY: + ret = DMA_IN_PROGRESS; + break; + default: + WARN_ON(1); + } break; } if (desc->last) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html