Skip to contentSkip to conversation

iop-adma: detangle dma_alloc_writecombine() use and check

PATCH In review Luis R. Rodriguez 2 participants 3 messages Jun 16, 2015 – Jun 25, 2015 dmaengine

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iop-adma: detangle dma_alloc_writecombine() use and check

From: "Luis R. Rodriguez" <[email protected]>

dma_alloc_writecombine()'s call and return value check is tangled in all in one call. Detangle both calls as we're used to.

---
 drivers/dma/iop-adma.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/dma/iop-adma.c +5 -4
index 9988268..e4f4312 100644
@@ -1300,10 +1300,11 @@ static int iop_adma_probe(struct platform_device *pdev)
 	 * note: writecombine gives slightly better performance, but
 	 * requires that we explicitly flush the writes
 	 */
-	if ((adev->dma_desc_pool_virt = dma_alloc_writecombine(&pdev->dev,
-					plat_data->pool_size,
-					&adev->dma_desc_pool,
-					GFP_KERNEL)) == NULL) {
+	adev->dma_desc_pool_virt = dma_alloc_writecombine(&pdev->dev,
+							  plat_data->pool_size,
+							  &adev->dma_desc_pool,
+							  GFP_KERNEL);
+	if (!adev->dma_desc_pool_virt) {
 		ret = -ENOMEM;
 		goto err_free_adev;
 	}
Signature · 1 line
2.3.2.209.gd67f9d5.dirty
#2 lore raw
Quoted 10 lines · Luis R. Rodriguez
Quoted 6 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

dma_alloc_writecombine()'s call and return value check is tangled in all in one call. Detangle both calls as we're used to.

Hey folks, can this be picked up for v4.2 or was it too late ?

OK well so this would be needed to do a full scrape change on the kernel for a rename of the API used, I'll merge this part of a bigger series now. If you can follow up on that series that would be appreciated. I'll cc you.

Luis