Skip to content

Commit 7686641

Browse files
arndbvinodkoul
authored andcommitted
dmaengine: ti: k3-udma: fix -Wenum-conversion warning
gcc warns about a mismatch argument type when passing 'false' into a function that expects an enum: drivers/dma/ti/k3-udma-private.c: In function 'xudma_tchan_get': drivers/dma/ti/k3-udma-private.c:86:34: warning: implicit conversion from 'enum <anonymous>' to 'enum udma_tp_level' [-Wenum-conversion] 86 | return __udma_reserve_##res(ud, false, id); \ | ^~~~~ drivers/dma/ti/k3-udma-private.c:95:1: note: in expansion of macro 'XUDMA_GET_PUT_RESOURCE' 95 | XUDMA_GET_PUT_RESOURCE(tchan); | ^~~~~~~~~~~~~~~~~~~~~~ In this case, false has the same numerical value as UDMA_TP_NORMAL, so passing that is most likely the correct way to avoid the warning without changing the behavior. Fixes: d702419 ("dmaengine: ti: k3-udma: Add glue layer for non DMAengine users") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20201026160123.3704531-1-arnd@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 484f910 commit 7686641

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/dma/ti/k3-udma-private.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ EXPORT_SYMBOL(xudma_rflow_is_gp);
8383
#define XUDMA_GET_PUT_RESOURCE(res) \
8484
struct udma_##res *xudma_##res##_get(struct udma_dev *ud, int id) \
8585
{ \
86-
return __udma_reserve_##res(ud, false, id); \
86+
return __udma_reserve_##res(ud, UDMA_TP_NORMAL, id); \
8787
} \
8888
EXPORT_SYMBOL(xudma_##res##_get); \
8989
\

0 commit comments

Comments
 (0)