[PATCH] staging/goldfish/goldfish_audio: Fix annotations
From: Ricardo Ribalda Delgado
Date: Mon Mar 16 2015 - 18:01:56 EST
dmam_alloc_coherent does not return a __iomem pointer.
here is its prototype:
void * dmam_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp)
This fixes these sparse warnings:
drivers/staging/goldfish/goldfish_audio.c:134:43: warning: incorrect
type in argument 2 (different address spaces)
drivers/staging/goldfish/goldfish_audio.c:134:43: expected void const
*from
drivers/staging/goldfish/goldfish_audio.c:134:43: got char [noderef]
<asn:2>*read_buffer
drivers/staging/goldfish/goldfish_audio.c:167:36: warning: incorrect
type in argument 1 (different address spaces)
drivers/staging/goldfish/goldfish_audio.c:167:36: expected void *to
drivers/staging/goldfish/goldfish_audio.c:167:36: got char [noderef]
<asn:2>*[assigned] kbuf
drivers/staging/goldfish/goldfish_audio.c:296:27: warning: incorrect
type in assignment (different address spaces)
drivers/staging/goldfish/goldfish_audio.c:296:27: expected char
[noderef] <asn:2>*buffer_virt
drivers/staging/goldfish/goldfish_audio.c:296:27: got void *
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx>
---
drivers/staging/goldfish/goldfish_audio.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index f200359..0dee1d6 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -40,12 +40,12 @@ struct goldfish_audio {
spinlock_t lock;
wait_queue_head_t wait;
- char __iomem *buffer_virt; /* combined buffer virtual address */
+ char *buffer_virt; /* combined buffer virtual address */
unsigned long buffer_phys; /* combined buffer physical address */
- char __iomem *write_buffer1; /* write buffer 1 virtual address */
- char __iomem *write_buffer2; /* write buffer 2 virtual address */
- char __iomem *read_buffer; /* read buffer virtual address */
+ char *write_buffer1; /* write buffer 1 virtual address */
+ char *write_buffer2; /* write buffer 2 virtual address */
+ char *read_buffer; /* read buffer virtual address */
int buffer_status;
int read_supported; /* true if we have audio input support */
};
@@ -147,7 +147,7 @@ static ssize_t goldfish_audio_write(struct file *fp, const char __user *buf,
struct goldfish_audio *data = fp->private_data;
unsigned long irq_flags;
ssize_t result = 0;
- char __iomem *kbuf;
+ char *kbuf;
while (count > 0) {
ssize_t copy = count;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/