linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: stm32-mdma: Remove redundant initialization of pointer hwdesc
@ 2021-12-04 14:00 Colin Ian King
  2021-12-06  8:29 ` [Linux-stm32] " Amelie DELAUNAY
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2021-12-04 14:00 UTC (permalink / raw)
  To: Vinod Koul, Maxime Coquelin, Alexandre Torgue, dmaengine,
	linux-stm32, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel

The pointer hwdesc is being initialized with a value that is never
read, it is being updated later in a for-loop. The assignment is
redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/dma/stm32-mdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c
index d30a4a28d3bf..805a449ff301 100644
--- a/drivers/dma/stm32-mdma.c
+++ b/drivers/dma/stm32-mdma.c
@@ -1279,7 +1279,7 @@ static size_t stm32_mdma_desc_residue(struct stm32_mdma_chan *chan,
 				      u32 curr_hwdesc)
 {
 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
-	struct stm32_mdma_hwdesc *hwdesc = desc->node[0].hwdesc;
+	struct stm32_mdma_hwdesc *hwdesc;
 	u32 cbndtr, residue, modulo, burst_size;
 	int i;
 
-- 
2.33.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Linux-stm32] [PATCH] dmaengine: stm32-mdma: Remove redundant initialization of pointer hwdesc
  2021-12-04 14:00 [PATCH] dmaengine: stm32-mdma: Remove redundant initialization of pointer hwdesc Colin Ian King
@ 2021-12-06  8:29 ` Amelie DELAUNAY
  0 siblings, 0 replies; 2+ messages in thread
From: Amelie DELAUNAY @ 2021-12-06  8:29 UTC (permalink / raw)
  To: Colin Ian King, Vinod Koul, Maxime Coquelin, Alexandre Torgue,
	dmaengine, linux-stm32, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel

Hi,

On 12/4/21 3:00 PM, Colin Ian King wrote:
> The pointer hwdesc is being initialized with a value that is never
> read, it is being updated later in a for-loop. The assignment is
> redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>

> ---
>   drivers/dma/stm32-mdma.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c
> index d30a4a28d3bf..805a449ff301 100644
> --- a/drivers/dma/stm32-mdma.c
> +++ b/drivers/dma/stm32-mdma.c
> @@ -1279,7 +1279,7 @@ static size_t stm32_mdma_desc_residue(struct stm32_mdma_chan *chan,
>   				      u32 curr_hwdesc)
>   {
>   	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
> -	struct stm32_mdma_hwdesc *hwdesc = desc->node[0].hwdesc;
> +	struct stm32_mdma_hwdesc *hwdesc;
>   	u32 cbndtr, residue, modulo, burst_size;
>   	int i;
>   
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-06  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-04 14:00 [PATCH] dmaengine: stm32-mdma: Remove redundant initialization of pointer hwdesc Colin Ian King
2021-12-06  8:29 ` [Linux-stm32] " Amelie DELAUNAY

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).