Path: csiph.com!aioe.org!goblin2!goblin.stu.neva.ru!gothmog.csi.it!bofh.it!news.nic.it!robomod From: "Luis R. Rodriguez" Newsgroups: linux.kernel Subject: [PATCH v3 1/2] drivers/dma/iop-adma: Use dma_alloc_writecombine() kernel-style Date: Tue, 28 Jul 2015 02:10:01 +0200 Message-ID: References: X-Original-To: mingo@elte.hu, bp@suse.de Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=nKIS8iXJWrR7V77KmHXgxPmHRs7yDkTzRnaZXCit+0k=; b=sMHljvcNC6/R3yyygAAVecPtLQ11ar43GHs7SvAL9VgEhqxT1VgP85QmOSBFYVyMFK TD8rbR6tbkg9O+SbvTSpIWiqvi4aH7UQwt+EhmdSeHqdch/PY9bkMYegGHRCuouMlu0n BdwckvkLsTebBprz/8u4du6IZl3xUYBrDhG9zF+TforIA9Itd6yUS/PAVAmgqRZo3Bwj OPm6zRxru7ZIMFQWnkh5NJwgYiHRdBkbHO6/JyPHSCDLWdjk/GD1Rzxh7z01iclaGLzs QwedfAcehGT4GgaV+q0v7aECzMy1PSb4ZX5Vqb5TeOpxR59H0rmoeW6XehXvu/oTsGUp 2iVQ== X-Received: by 10.70.39.74 with SMTP id n10mr73901957pdk.57.1438041893472; Mon, 27 Jul 2015 17:04:53 -0700 (PDT) X-Mailer: git-send-email 2.1.4 Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 44 Organization: linux.* mail to news gateway X-Original-Cc: vinod.koul@intel.com, dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, "Luis R. Rodriguez" , x86@kernel.org X-Original-Date: Mon, 27 Jul 2015 17:04:41 -0700 X-Original-Message-ID: <1438041882-10837-2-git-send-email-mcgrof@do-not-panic.com> X-Original-References: <1438041882-10837-1-git-send-email-mcgrof@do-not-panic.com> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: aioe.org linux.kernel:1193656 From: "Luis R. Rodriguez" 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 Cc: Dan Williams Cc: dmaengine@vger.kernel.org Cc: Vinod Koul 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 --- 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.3.2.209.gd67f9d5.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/