Skip to contentSkip to conversation

ARM:dmaengine:sun6i:fix the uninitialized value for v_lli

PATCH Superseded Axl-zhang 3 participants 3 messages Nov 2, 2016 – Nov 14, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Axl-zhang

author
#0 lore raw

PATCH 1/1 ARM:dmaengine:sun6i:fix the uninitialized value for v_lli

dma_pool_alloc does not initialize the value of the newly allocated block for the v_lli, and the uninitilize value make the tests failed which is on pine64 with dmatest.
we can fix it just change the "|=" to "=" for the v_lli->cfg.

---
 drivers/dma/sun6i-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/sun6i-dma.c +1 -1
index 3835fcd..52b48eb 100644
@@ -578,7 +578,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_memcpy(
 
 	burst = convert_burst(8);
 	width = convert_buswidth(DMA_SLAVE_BUSWIDTH_4_BYTES);
-	v_lli->cfg |= DMA_CHAN_CFG_SRC_DRQ(DRQ_SDRAM) |
+	v_lli->cfg = DMA_CHAN_CFG_SRC_DRQ(DRQ_SDRAM) |
 		DMA_CHAN_CFG_DST_DRQ(DRQ_SDRAM) |
 		DMA_CHAN_CFG_DST_LINEAR_MODE |
 		DMA_CHAN_CFG_SRC_LINEAR_MODE |
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Axl-zhang

dma_pool_alloc does not initialize the value of the newly allocated block for the v_lli, and the uninitilize value make the tests failed which is on pine64 with dmatest.
we can fix it just change the "|=" to "=" for the v_lli->cfg.

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161102/9194dd7d/attachment.sig>
#2 lore raw
In reply to Axl-zhang
Quoted 4 lines · Axl-zhang

dma_pool_alloc does not initialize the value of the newly allocated block for the v_lli, and the uninitilize value make the tests failed which is on pine64 with dmatest.
we can fix it just change the "|=" to "=" for the v_lli->cfg.

Applied after fixing the title. We dont need ARM.
Also spaces after each tag please..

Signature · 1 line
~Vinod