Thread (22 messages) 22 messages, 4 authors, 2016-01-23
STALE3791d REVIEWED: 1 (0M)

[PATCH v4 09/11] drivers/dma/iop-adma: Use dma_alloc_writecombine() kernel-style

From: Luis R. Rodriguez <hidden>
Date: 2015-08-24 19:14:21
Also in: linux-pci, lkml, xen-devel
Subsystem: dma generic offload engine subsystem, the rest · Maintainers: Vinod Koul, Linus Torvalds

From: "Luis R. Rodriguez" <redacted>

dma_alloc_writecombine()'s call and return value check is tangled in all
in one call. Untangle both calls according to kernel coding style.

Signed-off-by: Luis R. Rodriguez <redacted>
Acked-by: Vinod Koul <redacted>
Cc: Vinod Koul <redacted>
Cc: Dan Williams <redacted>
Cc: dmaengine@vger.kernel.org
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/1435258191-543-2-git-send-email-mcgrof@do-not-panic.com
Signed-off-by: Borislav Petkov <redacted>
---
 drivers/dma/iop-adma.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c
index 998826854fdd..e4f43125e0fb 100644
--- a/drivers/dma/iop-adma.c
+++ b/drivers/dma/iop-adma.c
@@ -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;
 	}
-- 
2.4.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help