From: mathieu.poirier@linaro.org
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: arnd@arndb.de, mathieu.poirier@linaro.org
Subject: [PATCH 3/8] caif: include linux/io.h
Date: Fri, 20 Apr 2012 14:56:11 -0600 [thread overview]
Message-ID: <1334955376-17793-4-git-send-email-mathieu.poirier@linaro.org> (raw)
In-Reply-To: <1334955376-17793-1-git-send-email-mathieu.poirier@linaro.org>
From: Arnd Bergmann <arnd@arndb.de>
The caif_shmcore requires io.h in order to use ioremap, so include that
explicitly to compile in all configurations.
Also add a note about the use of ioremap(), which is not a proper way
to map a DMA buffer into kernel space. It's not completely clear what
the intention is for using ioremap, but it is clear that the result
of ioremap must not simply be accessed using kernel pointers but
should use readl/writel or memcopy_{to,from}io. Assigning the result
of ioremap to a regular pointer that can also be set to something
else is not ok.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
drivers/net/caif/caif_shmcore.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c
index 5b20413..bc497d7 100644
--- a/drivers/net/caif/caif_shmcore.c
+++ b/drivers/net/caif/caif_shmcore.c
@@ -13,6 +13,7 @@
#include <linux/list.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
+#include <linux/io.h>
#include <net/caif/caif_device.h>
#include <net/caif/caif_shm.h>
@@ -647,6 +648,9 @@ int caif_shmcore_probe(struct shmdev_layer *pshm_dev)
if (pshm_dev->shm_loopback)
tx_buf->desc_vptr = (unsigned char *)tx_buf->phy_addr;
else
+ /*
+ * FIXME: the result of ioremap is not a pointer - arnd
+ */
tx_buf->desc_vptr =
ioremap(tx_buf->phy_addr, TX_BUF_SZ);
--
1.7.5.4
next prev parent reply other threads:[~2012-04-20 20:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 20:56 [PATCH 0/8] drivers/net: randconfig patches for kernel 3.3 mathieu.poirier
2012-04-20 20:56 ` [PATCH 1/8] davinci_cpdma: export symbols used by other drivers mathieu.poirier
2012-04-20 20:56 ` [PATCH 2/8] drivers/net: add missing __devexit_p() annotations mathieu.poirier
2012-04-20 20:56 ` mathieu.poirier [this message]
2012-04-20 20:56 ` [PATCH 4/8] drivers/net: iwmc3200 depends on EXPERIMENTAL mathieu.poirier
2012-04-20 20:56 ` [PATCH 5/8] 8390: select CRC32 support mathieu.poirier
2012-04-20 20:56 ` [PATCH 6/8] donauboe: replace excessive udelay with msleep mathieu.poirier
2012-04-20 20:56 ` [PATCH 7/8] sungem: use mdelay instead of udelay where necessary mathieu.poirier
2012-04-20 20:56 ` [PATCH 8/8] drivers/net: decouple ISA and ISA_DMA_API mathieu.poirier
2012-04-21 19:29 ` [PATCH 0/8] drivers/net: randconfig patches for kernel 3.3 David Miller
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=1334955376-17793-4-git-send-email-mathieu.poirier@linaro.org \
--to=mathieu.poirier@linaro.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).