lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-39c33704420b147fb7e193a9f406cc8420a1d610@git.kernel.org>
Date:	Tue, 25 Aug 2015 01:25:42 -0700
From:	"tip-bot for Luis R. Rodriguez" <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	hpa@...or.com, vinod.koul@...el.com, mingo@...nel.org,
	mcgrof@...e.com, bp@...e.de, torvalds@...ux-foundation.org,
	tglx@...utronix.de, dan.j.williams@...el.com,
	linux-kernel@...r.kernel.org, peterz@...radead.org
Subject: [tip:x86/mm] drivers/dma/iop-adma: Use dma_alloc_writecombine()
  kernel-style

Commit-ID:  39c33704420b147fb7e193a9f406cc8420a1d610
Gitweb:     http://git.kernel.org/tip/39c33704420b147fb7e193a9f406cc8420a1d610
Author:     Luis R. Rodriguez <mcgrof@...e.com>
AuthorDate: Mon, 24 Aug 2015 12:13:31 -0700
Committer:  Ingo Molnar <mingo@...nel.org>
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@...e.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Acked-by: Vinod Koul <vinod.koul@...el.com>
Cc: Dan Williams <dan.j.williams@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: airlied@...ux.ie
Cc: benh@...nel.crashing.org
Cc: bhelgaas@...gle.com
Cc: daniel.vetter@...ll.ch
Cc: dmaengine@...r.kernel.org
Cc: konrad.wilk@...cle.com
Cc: luto@...capital.net
Cc: mst@...hat.com
Cc: tomi.valkeinen@...com
Cc: toshi.kani@...com
Cc: xen-devel@...ts.xensource.com
Link: http://lkml.kernel.org/r/1440443613-13696-10-git-send-email-mcgrof@do-not-panic.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ