Skip to content

Commit

Permalink
dmaengine: timb_dma: Use proper enum in td_prep_slave_sg
Browse files Browse the repository at this point in the history
Clang warns when implicitly converting from one enumerated type to
another. Avoid this by using the equivalent value from the expected
type.

drivers/dma/timb_dma.c:548:27: warning: implicit conversion from
enumeration type 'enum dma_transfer_direction' to different enumeration
type 'enum dma_data_direction' [-Wenum-conversion]
                td_desc->desc_list_len, DMA_MEM_TO_DEV);
                                        ^~~~~~~~~~~~~~
1 warning generated.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Nathan Chancellor authored and Vinod Koul committed Oct 2, 2018
1 parent 9524d6b commit 5e621f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/timb_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan,
}

dma_sync_single_for_device(chan2dmadev(chan), td_desc->txd.phys,
td_desc->desc_list_len, DMA_MEM_TO_DEV);
td_desc->desc_list_len, DMA_TO_DEVICE);

return &td_desc->txd;
}
Expand Down

0 comments on commit 5e621f5

Please sign in to comment.