Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1166344
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | "Luis R. Rodriguez" <mcgrof@do-not-panic.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] iop-adma: detangle dma_alloc_writecombine() use and check |
| Date | Tue, 16 Jun 2015 21:50:01 +0200 |
| Message-ID | <pC51T-3OF-3@gated-at.bofh.it> (permalink) |
| X-Original-To | vinod.koul@intel.com |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=Y+fUcL2VS6vhZ3cXieI1sC7DFLZuoIFGFfgB+w7piWk=; b=WFUubwRhbTol5AxGnAevL8bQfuHXuJe5SiAkR1lDQJrVuSDN66MrbgmvBhXCD2aB8H H0RCEKbmMPAxSGDBX4eVWMDpCQjeXNYHiP8I17giJ92NdLadVNNw+5QWd6Bw7DH33DFR o2xuUve9jhwqb7GurNRjFGMe4iotb6tDmhLlmq1qmqXmS4NI+apFgWye1GcrWlQP2o6V UXfs/ZOCYpsfjbHncFU+f3ANQS31dlftKzKBLCDKCCABUrdeiCbc8Bfy98VDtccxpT0o cbhar/AYGJ/7PjFv8XseRKReyvboxvY2Ho9F2M07ryDRMJ5kk4ibqr4P5SSew7dHhZEE Cy8A== |
| X-Received | by 10.66.233.232 with SMTP id tz8mr3403853pac.77.1434483743878; Tue, 16 Jun 2015 12:42:23 -0700 (PDT) |
| X-Mailer | git-send-email 2.1.0 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 38 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, "Luis R. Rodriguez" <mcgrof@suse.com> |
| X-Original-Date | Tue, 16 Jun 2015 12:40:09 -0700 |
| X-Original-Message-ID | <1434483609-25498-1-git-send-email-mcgrof@do-not-panic.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1166344 |
Show key headers only | View raw
From: "Luis R. Rodriguez" <mcgrof@suse.com>
dma_alloc_writecombine()'s call and return value check is tangled in all
in one call. Detangle both calls as we're used to.
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
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;
}
--
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/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] iop-adma: detangle dma_alloc_writecombine() use and check "Luis R. Rodriguez" <mcgrof@do-not-panic.com> - 2015-06-16 21:50 +0200
csiph-web