* [PATCH] dmaengine: pl330: Typecast with enum to fix the coverity warning
@ 2021-06-29 10:37 Harini Katakam
2021-07-28 7:01 ` Vinod Koul
0 siblings, 1 reply; 3+ messages in thread
From: Harini Katakam @ 2021-06-29 10:37 UTC (permalink / raw)
To: vkoul
Cc: dmaengine, linux-kernel, harinikatakamlinux, michal.simek,
harini.katakam, radhey.shyam.pandey, shravya.kumbham
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;
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: pl330: Typecast with enum to fix the coverity warning
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
2021-09-14 8:07 ` Harini Katakam
0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2021-07-28 7:01 UTC (permalink / raw)
To: Harini Katakam
Cc: dmaengine, linux-kernel, harinikatakamlinux, michal.simek,
radhey.shyam.pandey, shravya.kumbham
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: pl330: Typecast with enum to fix the coverity warning
2021-07-28 7:01 ` Vinod Koul
@ 2021-09-14 8:07 ` Harini Katakam
0 siblings, 0 replies; 3+ messages in thread
From: Harini Katakam @ 2021-09-14 8:07 UTC (permalink / raw)
To: Vinod Koul
Cc: Harini Katakam, dmaengine, linux-kernel, Michal Simek,
radhey.shyam.pandey, shravya.kumbham
Hi Vinod,
<snip>
> > pch->cyclic = true;
> > - desc->txd.flags = flags;
> > + desc->txd.flags = (enum dma_ctrl_flags)flags;
>
> Does this driver use the txd.flags?
Sorry for the delayed response. This flag is not used and I'm working
on another patch to remove it.
Regards,
Harini
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-14 8:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-09-14 8:07 ` Harini Katakam
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).