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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Jul 2022 14:23:12 +0000
From:   "Pandey, Radhey Shyam" <radhey.shyam.pandey@....com>
To:     "Pandey, Radhey Shyam" <radhey.shyam.pandey@....com>,
        "vkoul@...nel.org" <vkoul@...nel.org>,
        "Simek, Michal" <michal.simek@....com>,
        "m.tretter@...gutronix.de" <m.tretter@...gutronix.de>
CC:     "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "git (AMD-Xilinx)" <git@....com>,
        Shravya Kumbham <shravyak@...x.xilinx.com>,
        "Katakam, Harini" <harini.katakam@....com>
Subject: RE: [PATCH] dmaengine: zynqmp_dma: Typecast with enum to fix the
 coverity warning

> -----Original Message-----
> From: Radhey Shyam Pandey <radhey.shyam.pandey@....com>
> Sent: Tuesday, May 24, 2022 1:19 PM
> To: vkoul@...nel.org; Michal Simek <michals@...inx.com>;
> m.tretter@...gutronix.de
> Cc: dmaengine@...r.kernel.org; linux-kernel@...r.kernel.org;
> git@....com; Shravya Kumbham <shravyak@...x.xilinx.com>; Harini
> Katakam <harinik@...inx.com>; Radhey Shyam Pandey
> <radhey.shyam.pandey@....com>
> Subject: [PATCH] dmaengine: zynqmp_dma: Typecast with enum to fix the
> coverity warning
> 
> From: Shravya Kumbham <shravya.kumbham@...inx.com>
> 
> Typecast the flags variable with (enum dma_ctrl_flags) in
> zynqmp_dma_prep_memcpy function to fix the coverity warning.
> 
> Addresses-Coverity: Event mixed_enum_type.
> Signed-off-by: Shravya Kumbham <shravya.kumbham@...inx.com>
> Signed-off-by: Harini Katakam <harini.katakam@...inx.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@....com>
> ---
> NOTE- This patch was sent to dmaengine mailing list[1] and
> there was a suggestion from Michael Tretter to change the
> signature of the dmaengine_prep_dma_memcpy() engine to accept
> "enum dma_ctrl_flags flags" instead of "unsigned long flags".
> 
> All device_prep_dma_* API variants have ulong flags argument.
> So this is a wider question if we want to change these APIs?
> Also there are existing users of these public APIs.
> 
> [1]: https://lore.kernel.org/linux-arm-kernel/20210914082817.22311-2-
> harini.katakam@...inx.com/t/#m1d1bc959f500b04fa1470caa31239a95c73fd
> 45d
> ---
>  drivers/dma/xilinx/zynqmp_dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/xilinx/zynqmp_dma.c
> b/drivers/dma/xilinx/zynqmp_dma.c
> index dc299ab36818..3f4ee3954384 100644
> --- a/drivers/dma/xilinx/zynqmp_dma.c
> +++ b/drivers/dma/xilinx/zynqmp_dma.c
> @@ -849,7 +849,7 @@ static struct dma_async_tx_descriptor
> *zynqmp_dma_prep_memcpy(
> 
>  	zynqmp_dma_desc_config_eod(chan, desc);
>  	async_tx_ack(&first->async_tx);
> -	first->async_tx.flags = flags;
> +	first->async_tx.flags = (enum dma_ctrl_flags)flags;
>  	return &first->async_tx;
>  }
> 
> --
Ping! for review.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ