lkml.org 
[lkml]   [2020]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dmaengine: ti: k3-udma: fix -Wenum-conversion warning
On 26-10-20, 17:01, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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.

Applied, thanks

--
~Vinod

\
 
 \ /
  Last update: 2020-10-28 23:21    [W:0.064 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site