Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754090AbbGWRXs (ORCPT ); Thu, 23 Jul 2015 13:23:48 -0400 Received: from mga01.intel.com ([192.55.52.88]:39269 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753299AbbGWRXp (ORCPT ); Thu, 23 Jul 2015 13:23:45 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,532,1432623600"; d="scan'208";a="734304203" Date: Thu, 23 Jul 2015 22:53:57 +0530 From: Vinod Koul To: "Luis R. Rodriguez" Cc: mingo@elte.hu, dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, "Luis R. Rodriguez" , x86@kernel.org, Borislav Petkov Subject: Re: [PATCH v2 1/2] drivers/dma/iop-adma: Use dma_alloc_writecombine() kernel-style Message-ID: <20150723172357.GC29916@localhost> References: <1436492064-3400-1-git-send-email-mcgrof@do-not-panic.com> <1436492064-3400-2-git-send-email-mcgrof@do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1436492064-3400-2-git-send-email-mcgrof@do-not-panic.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1885 Lines: 53 On Thu, Jul 09, 2015 at 06:34:23PM -0700, Luis R. Rodriguez wrote: > 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. > This looks okay, does it have dependency on anything Is this intended to be applied thru dmaengine tree or x86? -- ~Vinod > 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/