From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: linux-kernel@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>,
Dan Williams <djbw@fb.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Stephen Warren <swarren@wwwdotorg.org>,
linux-tegra@vger.kernel.org
Subject: [PATCH 09/12] tegra20-apb-dma: remove useless use of lock
Date: Mon, 27 May 2013 15:14:39 +0300 [thread overview]
Message-ID: <1369656882-25241-10-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1369656882-25241-1-git-send-email-andriy.shevchenko@linux.intel.com>
Accordingly to dma_cookie_status() description locking is not required.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: linux-tegra@vger.kernel.org
---
drivers/dma/tegra20-apb-dma.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 33f59ec..019ccfa 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -767,13 +767,11 @@ static enum dma_status tegra_dma_tx_status(struct dma_chan *dc,
unsigned long flags;
unsigned int residual;
- spin_lock_irqsave(&tdc->lock, flags);
-
ret = dma_cookie_status(dc, cookie, txstate);
- if (ret == DMA_SUCCESS) {
- spin_unlock_irqrestore(&tdc->lock, flags);
+ if (ret == DMA_SUCCESS)
return ret;
- }
+
+ spin_lock_irqsave(&tdc->lock, flags);
/* Check on wait_ack desc status */
list_for_each_entry(dma_desc, &tdc->free_dma_desc, node) {
--
1.8.2.rc0.22.gb3600c3
next prev parent reply other threads:[~2013-05-27 12:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 12:14 [PATCH 00/12] dma: various minor clean ups for slave drivers Andy Shevchenko
2013-05-27 12:14 ` Andy Shevchenko [this message]
2013-05-29 10:56 ` [PATCH 09/12] tegra20-apb-dma: remove useless use of lock Laxman Dewangan
[not found] ` <51A5DEDC.4040606-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-29 13:42 ` Andy Shevchenko
[not found] ` <1369656882-25241-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-05-30 17:47 ` [PATCH 00/12] dma: various minor clean ups for slave drivers Vinod Koul
[not found] ` <20130530174727.GE3767-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-05-30 18:32 ` Andy Shevchenko
[not found] ` <CAHp75VcZCVskWnQuNeO4A0keZJS27vaWe5zTDomAgSa_ezyUQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-15 9:37 ` Vinod Koul
[not found] ` <20130715093748.GO16653-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-07-15 10:21 ` Andy Shevchenko
2013-07-15 9:59 ` Vinod Koul
2013-06-01 0:09 ` Dan Williams
[not found] ` <CAA9_cmdNiLfJjv-8Mh-Xb1ifZb4aw_9NGCVW6aWsfq6BN-DYyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-15 9:33 ` Vinod Koul
2013-07-10 7:54 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369656882-25241-10-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=djbw@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox