diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-09-05 10:35:20 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 10:41:16 +0200 |
commit | 4d23359b7ec8b03da2154df935af7d625075f6cf (patch) | |
tree | ba0ddfae17312fb449fb4c1f1a294c4f7db0f998 /sound/pci | |
parent | 49045d3d4dc7c43310b1fca693e29fcdbe68faba (diff) | |
download | linux-4d23359b7ec8b03da2154df935af7d625075f6cf.tar.gz linux-4d23359b7ec8b03da2154df935af7d625075f6cf.tar.bz2 linux-4d23359b7ec8b03da2154df935af7d625075f6cf.zip |
[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>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/emu10k1/emufx.c | 12 | ||||
-rw-r--r-- | sound/pci/nm256/nm256.c | 2 | ||||
-rw-r--r-- | sound/pci/rme32.c | 6 | ||||
-rw-r--r-- | sound/pci/rme96.c | 6 |
4 files changed, 15 insertions, 11 deletions
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index 637c555cfdb1..2f7a03103c91 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c @@ -470,7 +470,7 @@ static void snd_emu10k1_write_op(emu10k1_fx8010_code_t *icode, unsigned int *ptr { u_int32_t *code; snd_assert(*ptr < 512, return); - code = (u_int32_t *)icode->code + (*ptr) * 2; + code = (u_int32_t __force *)icode->code + (*ptr) * 2; set_bit(*ptr, icode->code_valid); code[0] = ((x & 0x3ff) << 10) | (y & 0x3ff); code[1] = ((op & 0x0f) << 20) | ((r & 0x3ff) << 10) | (a & 0x3ff); @@ -485,7 +485,7 @@ static void snd_emu10k1_audigy_write_op(emu10k1_fx8010_code_t *icode, unsigned i { u_int32_t *code; snd_assert(*ptr < 1024, return); - code = (u_int32_t *)icode->code + (*ptr) * 2; + code = (u_int32_t __force *)icode->code + (*ptr) * 2; set_bit(*ptr, icode->code_valid); code[0] = ((x & 0x7ff) << 12) | (y & 0x7ff); code[1] = ((op & 0x0f) << 24) | ((r & 0x7ff) << 12) | (a & 0x7ff); @@ -1042,7 +1042,7 @@ static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu) err = -ENOMEM; goto __err; } - gpr_map = (u32 *)icode->gpr_map; + gpr_map = (u32 __force *)icode->gpr_map; icode->tram_data_map = icode->gpr_map + 512; icode->tram_addr_map = icode->tram_data_map + 256; @@ -1431,7 +1431,7 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input)) __err: kfree(controls); if (icode != NULL) { - kfree((void *)icode->gpr_map); + kfree((void __force *)icode->gpr_map); kfree(icode); } return err; @@ -1511,7 +1511,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu) err = -ENOMEM; goto __err; } - gpr_map = (u32 *)icode->gpr_map; + gpr_map = (u32 __force *)icode->gpr_map; icode->tram_data_map = icode->gpr_map + 256; icode->tram_addr_map = icode->tram_data_map + 160; @@ -2032,7 +2032,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu) kfree(ipcm); kfree(controls); if (icode != NULL) { - kfree((void *)icode->gpr_map); + kfree((void __force *)icode->gpr_map); kfree(icode); } return err; diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index 2bbeb10ff7c4..24f146b6ebab 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c @@ -840,7 +840,7 @@ static void snd_nm256_setup_stream(nm256_t *chip, nm256_stream_t *s, runtime->hw = *hw_ptr; runtime->hw.buffer_bytes_max = s->bufsize; runtime->hw.period_bytes_max = s->bufsize / 2; - runtime->dma_area = (void*) s->bufptr; + runtime->dma_area = (void __force *) s->bufptr; runtime->dma_addr = s->bufptr_addr; runtime->dma_bytes = s->bufsize; runtime->private_data = s; diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index 456be39e8e4a..cfb5f44b2d43 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c @@ -692,7 +692,8 @@ snd_rme32_playback_hw_params(snd_pcm_substream_t * substream, if (err < 0) return err; } else { - runtime->dma_area = (void *)(rme32->iobase + RME32_IO_DATA_BUFFER); + runtime->dma_area = (void __force *)(rme32->iobase + + RME32_IO_DATA_BUFFER); runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; runtime->dma_bytes = RME32_BUFFER_SIZE; } @@ -746,7 +747,8 @@ snd_rme32_capture_hw_params(snd_pcm_substream_t * substream, if (err < 0) return err; } else { - runtime->dma_area = (void *)rme32->iobase + RME32_IO_DATA_BUFFER; + runtime->dma_area = (void __force *)rme32->iobase + + RME32_IO_DATA_BUFFER; runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; runtime->dma_bytes = RME32_BUFFER_SIZE; } diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index 9645e9004a48..2da33138fa4b 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c @@ -985,7 +985,8 @@ snd_rme96_playback_hw_params(snd_pcm_substream_t *substream, snd_pcm_runtime_t *runtime = substream->runtime; int err, rate, dummy; - runtime->dma_area = (void *)(rme96->iobase + RME96_IO_PLAY_BUFFER); + runtime->dma_area = (void __force *)(rme96->iobase + + RME96_IO_PLAY_BUFFER); runtime->dma_addr = rme96->port + RME96_IO_PLAY_BUFFER; runtime->dma_bytes = RME96_BUFFER_SIZE; @@ -1037,7 +1038,8 @@ snd_rme96_capture_hw_params(snd_pcm_substream_t *substream, snd_pcm_runtime_t *runtime = substream->runtime; int err, isadat, rate; - runtime->dma_area = (void *)(rme96->iobase + RME96_IO_REC_BUFFER); + runtime->dma_area = (void __force *)(rme96->iobase + + RME96_IO_REC_BUFFER); runtime->dma_addr = rme96->port + RME96_IO_REC_BUFFER; runtime->dma_bytes = RME96_BUFFER_SIZE; |