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]
Message-ID: <YQEA0DWG4X8U83/z@matsya>
Date:   Wed, 28 Jul 2021 12:31:36 +0530
From:   Vinod Koul <vkoul@...nel.org>
To:     Harini Katakam <harini.katakam@...inx.com>
Cc:     dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
        harinikatakamlinux@...il.com, michal.simek@...inx.com,
        radhey.shyam.pandey@...inx.com, shravya.kumbham@...inx.com
Subject: Re: [PATCH] dmaengine: pl330: Typecast with enum to fix the coverity
 warning

On 29-06-21, 16:07, Harini Katakam wrote:
> From: Shravya Kumbham <shravya.kumbham@...inx.com>
> 
> Typecast the flags and flg variables with (enum dma_ctrl_flags) in
> pl330_prep_dma_cyclic, pl330_prep_dma_memcpy and pl330_prep_slave_sg
> functions 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>
> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
> ---
>  drivers/dma/pl330.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 110de8a60058..35afbad2e1a7 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -2752,7 +2752,7 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
>  		return NULL;
>  
>  	pch->cyclic = true;
> -	desc->txd.flags = flags;
> +	desc->txd.flags = (enum dma_ctrl_flags)flags;

Does this driver use the txd.flags?

>  
>  	return &desc->txd;
>  }
> @@ -2804,7 +2804,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,
>  
>  	desc->bytes_requested = len;
>  
> -	desc->txd.flags = flags;
> +	desc->txd.flags = (enum dma_ctrl_flags)flags;
>  
>  	return &desc->txd;
>  }
> @@ -2889,7 +2889,7 @@ pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
>  	}
>  
>  	/* Return the last desc in the chain */
> -	desc->txd.flags = flg;
> +	desc->txd.flags = (enum dma_ctrl_flags)flg;
>  	return &desc->txd;
>  }
>  
> -- 
> 2.17.1

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ