mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
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: d702419134
("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>
This commit is contained in:
parent
484f910e93
commit
768664114b
@ -83,7 +83,7 @@ EXPORT_SYMBOL(xudma_rflow_is_gp);
|
||||
#define XUDMA_GET_PUT_RESOURCE(res) \
|
||||
struct udma_##res *xudma_##res##_get(struct udma_dev *ud, int id) \
|
||||
{ \
|
||||
return __udma_reserve_##res(ud, false, id); \
|
||||
return __udma_reserve_##res(ud, UDMA_TP_NORMAL, id); \
|
||||
} \
|
||||
EXPORT_SYMBOL(xudma_##res##_get); \
|
||||
\
|
||||
|
Loading…
Reference in New Issue
Block a user