From patchwork Mon Aug 24 19:13:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis R. Rodriguez" X-Patchwork-Id: 7066291 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0D766C05AD for ; Mon, 24 Aug 2015 19:15:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2457220570 for ; Mon, 24 Aug 2015 19:15:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3EA5B206E5 for ; Mon, 24 Aug 2015 19:15:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755431AbbHXTOT (ORCPT ); Mon, 24 Aug 2015 15:14:19 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35694 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755391AbbHXTOQ (ORCPT ); Mon, 24 Aug 2015 15:14:16 -0400 Received: by pacdd16 with SMTP id dd16so103451768pac.2; Mon, 24 Aug 2015 12:14:15 -0700 (PDT) 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=wz5JAcZSfWKUGSWzKMAlQ48Jz4VoLl08rKOA2tQL31s=; b=IhgIGZJmU/T8RMyl4lWQASOD8i6HB44iPZ02nwPI+ZMnC0l65KVBidSsHe1kIJUuWh dT4uoETu6f7e1Do8IlYGH/xMxOGsqenZ+66P4aUYY5BA/3mWSpZ0vNa6h2TPMgMZoxfL 6Sgtz5ignxdPBCKErKizDs1cgHXWRSKlY69OhXlyJPOC9+82h2Cy3Rt3y0s388rx6MJP s/g9dk1AE3QIP0OkckSDv1t49p7HN7L10S4hQAFeYKCPYFgDSJVMj4apStDX2Iu7BStd mtOpRRssO+hvj8J4gMtEW1HVdNQGQmA3xOelHEflPFYE+GRK2RS2TCi9z8StZJavrQVg VGHg== X-Received: by 10.66.139.6 with SMTP id qu6mr34777079pab.77.1440443655715; Mon, 24 Aug 2015 12:14:15 -0700 (PDT) Received: from mcgrof@gmail.com ([2601:646:200:bc5b:ca60:ff:feda:57a7]) by smtp.gmail.com with ESMTPSA id ev2sm18268497pbb.37.2015.08.24.12.14.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Aug 2015 12:14:14 -0700 (PDT) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Mon, 24 Aug 2015 12:14:12 -0700 From: "Luis R. Rodriguez" To: mingo@kernel.org Cc: bp@suse.de, bhelgaas@google.com, tomi.valkeinen@ti.com, airlied@linux.ie, linux-fbdev@vger.kernel.org, luto@amacapital.net, vinod.koul@intel.com, dan.j.williams@intel.com, toshi.kani@hp.com, benh@kernel.crashing.org, mst@redhat.com, akpm@linux-foundation.org, daniel.vetter@ffwll.ch, konrad.wilk@oracle.com, x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xensource.com, "Luis R. Rodriguez" , dmaengine@vger.kernel.org Subject: [PATCH v4 09/11] drivers/dma/iop-adma: Use dma_alloc_writecombine() kernel-style Date: Mon, 24 Aug 2015 12:13:31 -0700 Message-Id: <1440443613-13696-10-git-send-email-mcgrof@do-not-panic.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1440443613-13696-1-git-send-email-mcgrof@do-not-panic.com> References: <1440443613-13696-1-git-send-email-mcgrof@do-not-panic.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Vinod Koul Cc: Vinod Koul Cc: Dan Williams 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 --- 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; }