Skip to content

Commit 9524d6b

Browse files
nathanchancevinodkoul
authored andcommitted
dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction
Clang warns when implicitly converting from one enumerated type to another. Avoid this by using the equivalent value from the expected type. In file included from drivers/dma/ep93xx_dma.c:30: ./include/linux/platform_data/dma-ep93xx.h:88:10: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] return DMA_NONE; ~~~~~~ ^~~~~~~~ 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>
1 parent 5b394b2 commit 9524d6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/platform_data/dma-ep93xx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static inline enum dma_transfer_direction
8585
ep93xx_dma_chan_direction(struct dma_chan *chan)
8686
{
8787
if (!ep93xx_dma_chan_is_m2p(chan))
88-
return DMA_NONE;
88+
return DMA_TRANS_NONE;
8989

9090
/* even channels are for TX, odd for RX */
9191
return (chan->chan_id % 2 == 0) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;

0 commit comments

Comments
 (0)