* [PATCH][next] dmaengine: sh: Fix unused initialization of pointer lmdesc
@ 2021-08-29 15:28 Colin King
2021-08-31 16:19 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-08-29 15:28 UTC (permalink / raw)
To: Vinod Koul, Biju Das, Lad Prabhakar, dmaengine
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer lmdesc is being inintialized with a value that is never read,
it is later being re-assigned a new value. Fix this by initializing
it with the latter value.
Addresses-Coverity: ("Unused value")
Fixes: 550c591a89a1 ("dmaengine: sh: Add DMAC driver for RZ/G2L SoC")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/dma/sh/rz-dmac.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c
index 11986a8d22fc..3d1c239de306 100644
--- a/drivers/dma/sh/rz-dmac.c
+++ b/drivers/dma/sh/rz-dmac.c
@@ -308,12 +308,10 @@ static void rz_dmac_prepare_desc_for_memcpy(struct rz_dmac_chan *channel)
{
struct dma_chan *chan = &channel->vc.chan;
struct rz_dmac *dmac = to_rz_dmac(chan->device);
- struct rz_lmdesc *lmdesc = channel->lmdesc.base;
+ struct rz_lmdesc *lmdesc = channel->lmdesc.tail;
struct rz_dmac_desc *d = channel->desc;
u32 chcfg = CHCFG_MEM_COPY;
- lmdesc = channel->lmdesc.tail;
-
/* prepare descriptor */
lmdesc->sa = d->src;
lmdesc->da = d->dest;
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] dmaengine: sh: Fix unused initialization of pointer lmdesc
2021-08-29 15:28 [PATCH][next] dmaengine: sh: Fix unused initialization of pointer lmdesc Colin King
@ 2021-08-31 16:19 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-08-31 16:19 UTC (permalink / raw)
To: Colin King
Cc: Biju Das, Lad Prabhakar, dmaengine, kernel-janitors, linux-kernel
On 29-08-21, 16:28, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer lmdesc is being inintialized with a value that is never read,
> it is later being re-assigned a new value. Fix this by initializing
> it with the latter value.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-31 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29 15:28 [PATCH][next] dmaengine: sh: Fix unused initialization of pointer lmdesc Colin King
2021-08-31 16:19 ` Vinod Koul
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).