lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201028055214.GG3550@vkoul-mobl>
Date:   Wed, 28 Oct 2020 11:22:14 +0530
From:   Vinod Koul <vkoul@...nel.org>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Peter Ujfalusi <peter.ujfalusi@...com>,
        Grygorii Strashko <grygorii.strashko@...com>,
        Arnd Bergmann <arnd@...db.de>,
        Dan Williams <dan.j.williams@...el.com>,
        Yu Kuai <yukuai3@...wei.com>, dmaengine@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dmaengine: ti: k3-udma: fix -Wenum-conversion warning

On 26-10-20, 17:01, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ