From: "Richard Röjfors" <richard.rojfors@pelagicore.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"Dan J <dan.j.williams"@intel.com
Subject: [PATCH] dma: timb-dma: Update comment and fix compiler warning
Date: Fri, 26 Mar 2010 08:23:58 +0100 [thread overview]
Message-ID: <1269588238.26867.8.camel@debian> (raw)
An incremental patch which clarifies what the spinlock is used for
and fixes a compiler warning.
Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
---
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 4dd7102..145f1c2 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -79,7 +79,10 @@ struct timb_dma_desc {
struct timb_dma_chan {
struct dma_chan chan;
void __iomem *membase;
- spinlock_t lock; /* Used for mutual exclusion */
+ spinlock_t lock; /* Used to protect data structures,
+ especially the lists and descriptors,
+ from races between the tasklet and calls
+ from above */
dma_cookie_t last_completed_cookie;
bool ongoing;
struct list_head active_list;
@@ -197,7 +200,7 @@ static int td_fill_desc(struct timb_dma_chan *td_chan, u8 *dma_desc,
}
dev_dbg(chan2dev(&td_chan->chan), "desc: %p, addr: %p\n",
- dma_desc, (void *)(int)sg_dma_address(sg));
+ dma_desc, (void *)sg_dma_address(sg));
dma_desc[7] = (sg_dma_address(sg) >> 24) & 0xff;
dma_desc[6] = (sg_dma_address(sg) >> 16) & 0xff;
reply other threads:[~2010-03-26 7:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1269588238.26867.8.camel@debian \
--to=richard.rojfors@pelagicore.com \
--cc="Dan J <dan.j.williams"@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.