Skip to contentSkip to conversation

fpga: zynq-fpga: Delete not needed variable

PATCH Matthias Brugger 1 participant 1 message Oct 28, 2016 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 4 lines · Matthias Brugger

Variable count is never changed in the write path, we don't need to save it for freeing the dma memory.

This is obsolete, as Jason already has this in his patch [1]. Sorry for the noise.

[1] http://www.spinics.net/lists/arm-kernel/msg538868.html

Quoted 31 lines
---
 drivers/fpga/zynq-fpga.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/fpga/zynq-fpga.c +1 -3
index c2fb412..ffc2823 100644
@@ -287,12 +287,10 @@ static int zynq_fpga_ops_write(struct fpga_manager *mgr,
 	struct zynq_fpga_priv *priv;
 	int err;
 	char *kbuf;
-	size_t in_count;
 	dma_addr_t dma_addr;
 	u32 transfer_length;
 	u32 intr_status;
 
-	in_count = count;
 	priv = mgr->priv;
 
 	kbuf = dma_alloc_coherent(priv->dev, count, &dma_addr, GFP_KERNEL);
@@ -338,7 +336,7 @@ static int zynq_fpga_ops_write(struct fpga_manager *mgr,
 	clk_disable(priv->clk);
 
 out_free:
-	dma_free_coherent(priv->dev, in_count, kbuf, dma_addr);
+	dma_free_coherent(priv->dev, count, kbuf, dma_addr);
 
 	return err;
 }