[ALSA] sparse address space annotations

ALSA Core,RawMidi Midlevel,ALSA<-OSS emulation,ALSA sequencer
RME32 driver,RME96 driver,EMU10K1/EMU10K2 driver,NM256 driver
Add sparse annotations where we do strange this with __iomem/__user
pointers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This commit is contained in:
Clemens Ladisch
2005-09-05 10:35:20 +02:00
committed by Jaroslav Kysela
parent 49045d3d4d
commit 4d23359b7e
8 changed files with 33 additions and 19 deletions

View File

@@ -413,7 +413,9 @@ static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count, l
}
count -= sizeof(snd_seq_event_t);
buf += sizeof(snd_seq_event_t);
err = snd_seq_expand_var_event(&cell->event, count, (char *)buf, 0, sizeof(snd_seq_event_t));
err = snd_seq_expand_var_event(&cell->event, count,
(char __force *)buf, 0,
sizeof(snd_seq_event_t));
if (err < 0)
break;
result += err;
@@ -1009,7 +1011,8 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf, size_t c
}
/* set user space pointer */
event.data.ext.len = extlen | SNDRV_SEQ_EXT_USRPTR;
event.data.ext.ptr = (char*)buf + sizeof(snd_seq_event_t);
event.data.ext.ptr = (char __force *)buf
+ sizeof(snd_seq_event_t);
len += extlen; /* increment data length */
} else {
#ifdef CONFIG_COMPAT