[tip:x86/mm] drivers/dma/iop-adma: Use dma_alloc_writecombine() kernel-style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  39c33704420b147fb7e193a9f406cc8420a1d610
Gitweb:     http://git.kernel.org/tip/39c33704420b147fb7e193a9f406cc8420a1d610
Author:     Luis R. Rodriguez <mcgrof@xxxxxxxx>
AuthorDate: Mon, 24 Aug 2015 12:13:31 -0700
Committer:  Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Tue, 25 Aug 2015 09:59:46 +0200

drivers/dma/iop-adma: Use dma_alloc_writecombine() kernel-style

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 <mcgrof@xxxxxxxx>
Signed-off-by: Borislav Petkov <bp@xxxxxxx>
Acked-by: Vinod Koul <vinod.koul@xxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: airlied@xxxxxxxx
Cc: benh@xxxxxxxxxxxxxxxxxxx
Cc: bhelgaas@xxxxxxxxxx
Cc: daniel.vetter@xxxxxxxx
Cc: dmaengine@xxxxxxxxxxxxxxx
Cc: konrad.wilk@xxxxxxxxxx
Cc: luto@xxxxxxxxxxxxxx
Cc: mst@xxxxxxxxxx
Cc: tomi.valkeinen@xxxxxx
Cc: toshi.kani@xxxxxx
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Link: http://lkml.kernel.org/r/1440443613-13696-10-git-send-email-mcgrof@xxxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
 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 9988268..e4f4312 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;
 	}
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux