From: Vinod Koul <vkoul@kernel.org>
To: Harini Katakam <harini.katakam@xilinx.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
harinikatakamlinux@gmail.com, michal.simek@xilinx.com,
radhey.shyam.pandey@xilinx.com, shravya.kumbham@xilinx.com
Subject: Re: [PATCH] dmaengine: pl330: Typecast with enum to fix the coverity warning
Date: Wed, 28 Jul 2021 12:31:36 +0530 [thread overview]
Message-ID: <YQEA0DWG4X8U83/z@matsya> (raw)
In-Reply-To: <20210629103710.24828-1-harini.katakam@xilinx.com>
On 29-06-21, 16:07, Harini Katakam wrote:
> From: Shravya Kumbham <shravya.kumbham@xilinx.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@xilinx.com>
> Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.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
next prev parent reply other threads:[~2021-07-28 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 10:37 [PATCH] dmaengine: pl330: Typecast with enum to fix the coverity warning Harini Katakam
2021-07-28 7:01 ` Vinod Koul [this message]
2021-09-14 8:07 ` Harini Katakam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YQEA0DWG4X8U83/z@matsya \
--to=vkoul@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=harini.katakam@xilinx.com \
--cc=harinikatakamlinux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=radhey.shyam.pandey@xilinx.com \
--cc=shravya.kumbham@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).