diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-09-05 04:35:20 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 04:41:16 -0400 |
commit | 4d23359b7ec8b03da2154df935af7d625075f6cf (patch) | |
tree | ba0ddfae17312fb449fb4c1f1a294c4f7db0f998 /sound/pci | |
parent | 49045d3d4dc7c43310b1fca693e29fcdbe68faba (diff) |
[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 | |||
470 | { | 470 | { |
471 | u_int32_t *code; | 471 | u_int32_t *code; |
472 | snd_assert(*ptr < 512, return); | 472 | snd_assert(*ptr < 512, return); |
473 | code = (u_int32_t *)icode->code + (*ptr) * 2; | 473 | code = (u_int32_t __force *)icode->code + (*ptr) * 2; |
474 | set_bit(*ptr, icode->code_valid); | 474 | set_bit(*ptr, icode->code_valid); |
475 | code[0] = ((x & 0x3ff) << 10) | (y & 0x3ff); | 475 | code[0] = ((x & 0x3ff) << 10) | (y & 0x3ff); |
476 | code[1] = ((op & 0x0f) << 20) | ((r & 0x3ff) << 10) | (a & 0x3ff); | 476 | 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 | |||
485 | { | 485 | { |
486 | u_int32_t *code; | 486 | u_int32_t *code; |
487 | snd_assert(*ptr < 1024, return); | 487 | snd_assert(*ptr < 1024, return); |
488 | code = (u_int32_t *)icode->code + (*ptr) * 2; | 488 | code = (u_int32_t __force *)icode->code + (*ptr) * 2; |
489 | set_bit(*ptr, icode->code_valid); | 489 | set_bit(*ptr, icode->code_valid); |
490 | code[0] = ((x & 0x7ff) << 12) | (y & 0x7ff); | 490 | code[0] = ((x & 0x7ff) << 12) | (y & 0x7ff); |
491 | code[1] = ((op & 0x0f) << 24) | ((r & 0x7ff) << 12) | (a & 0x7ff); | 491 | 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) | |||
1042 | err = -ENOMEM; | 1042 | err = -ENOMEM; |
1043 | goto __err; | 1043 | goto __err; |
1044 | } | 1044 | } |
1045 | gpr_map = (u32 *)icode->gpr_map; | 1045 | gpr_map = (u32 __force *)icode->gpr_map; |
1046 | 1046 | ||
1047 | icode->tram_data_map = icode->gpr_map + 512; | 1047 | icode->tram_data_map = icode->gpr_map + 512; |
1048 | icode->tram_addr_map = icode->tram_data_map + 256; | 1048 | 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)) | |||
1431 | __err: | 1431 | __err: |
1432 | kfree(controls); | 1432 | kfree(controls); |
1433 | if (icode != NULL) { | 1433 | if (icode != NULL) { |
1434 | kfree((void *)icode->gpr_map); | 1434 | kfree((void __force *)icode->gpr_map); |
1435 | kfree(icode); | 1435 | kfree(icode); |
1436 | } | 1436 | } |
1437 | return err; | 1437 | return err; |
@@ -1511,7 +1511,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu) | |||
1511 | err = -ENOMEM; | 1511 | err = -ENOMEM; |
1512 | goto __err; | 1512 | goto __err; |
1513 | } | 1513 | } |
1514 | gpr_map = (u32 *)icode->gpr_map; | 1514 | gpr_map = (u32 __force *)icode->gpr_map; |
1515 | 1515 | ||
1516 | icode->tram_data_map = icode->gpr_map + 256; | 1516 | icode->tram_data_map = icode->gpr_map + 256; |
1517 | icode->tram_addr_map = icode->tram_data_map + 160; | 1517 | icode->tram_addr_map = icode->tram_data_map + 160; |
@@ -2032,7 +2032,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu) | |||
2032 | kfree(ipcm); | 2032 | kfree(ipcm); |
2033 | kfree(controls); | 2033 | kfree(controls); |
2034 | if (icode != NULL) { | 2034 | if (icode != NULL) { |
2035 | kfree((void *)icode->gpr_map); | 2035 | kfree((void __force *)icode->gpr_map); |
2036 | kfree(icode); | 2036 | kfree(icode); |
2037 | } | 2037 | } |
2038 | return err; | 2038 | 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, | |||
840 | runtime->hw = *hw_ptr; | 840 | runtime->hw = *hw_ptr; |
841 | runtime->hw.buffer_bytes_max = s->bufsize; | 841 | runtime->hw.buffer_bytes_max = s->bufsize; |
842 | runtime->hw.period_bytes_max = s->bufsize / 2; | 842 | runtime->hw.period_bytes_max = s->bufsize / 2; |
843 | runtime->dma_area = (void*) s->bufptr; | 843 | runtime->dma_area = (void __force *) s->bufptr; |
844 | runtime->dma_addr = s->bufptr_addr; | 844 | runtime->dma_addr = s->bufptr_addr; |
845 | runtime->dma_bytes = s->bufsize; | 845 | runtime->dma_bytes = s->bufsize; |
846 | runtime->private_data = s; | 846 | 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, | |||
692 | if (err < 0) | 692 | if (err < 0) |
693 | return err; | 693 | return err; |
694 | } else { | 694 | } else { |
695 | runtime->dma_area = (void *)(rme32->iobase + RME32_IO_DATA_BUFFER); | 695 | runtime->dma_area = (void __force *)(rme32->iobase + |
696 | RME32_IO_DATA_BUFFER); | ||
696 | runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; | 697 | runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; |
697 | runtime->dma_bytes = RME32_BUFFER_SIZE; | 698 | runtime->dma_bytes = RME32_BUFFER_SIZE; |
698 | } | 699 | } |
@@ -746,7 +747,8 @@ snd_rme32_capture_hw_params(snd_pcm_substream_t * substream, | |||
746 | if (err < 0) | 747 | if (err < 0) |
747 | return err; | 748 | return err; |
748 | } else { | 749 | } else { |
749 | runtime->dma_area = (void *)rme32->iobase + RME32_IO_DATA_BUFFER; | 750 | runtime->dma_area = (void __force *)rme32->iobase + |
751 | RME32_IO_DATA_BUFFER; | ||
750 | runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; | 752 | runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; |
751 | runtime->dma_bytes = RME32_BUFFER_SIZE; | 753 | runtime->dma_bytes = RME32_BUFFER_SIZE; |
752 | } | 754 | } |
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, | |||
985 | snd_pcm_runtime_t *runtime = substream->runtime; | 985 | snd_pcm_runtime_t *runtime = substream->runtime; |
986 | int err, rate, dummy; | 986 | int err, rate, dummy; |
987 | 987 | ||
988 | runtime->dma_area = (void *)(rme96->iobase + RME96_IO_PLAY_BUFFER); | 988 | runtime->dma_area = (void __force *)(rme96->iobase + |
989 | RME96_IO_PLAY_BUFFER); | ||
989 | runtime->dma_addr = rme96->port + RME96_IO_PLAY_BUFFER; | 990 | runtime->dma_addr = rme96->port + RME96_IO_PLAY_BUFFER; |
990 | runtime->dma_bytes = RME96_BUFFER_SIZE; | 991 | runtime->dma_bytes = RME96_BUFFER_SIZE; |
991 | 992 | ||
@@ -1037,7 +1038,8 @@ snd_rme96_capture_hw_params(snd_pcm_substream_t *substream, | |||
1037 | snd_pcm_runtime_t *runtime = substream->runtime; | 1038 | snd_pcm_runtime_t *runtime = substream->runtime; |
1038 | int err, isadat, rate; | 1039 | int err, isadat, rate; |
1039 | 1040 | ||
1040 | runtime->dma_area = (void *)(rme96->iobase + RME96_IO_REC_BUFFER); | 1041 | runtime->dma_area = (void __force *)(rme96->iobase + |
1042 | RME96_IO_REC_BUFFER); | ||
1041 | runtime->dma_addr = rme96->port + RME96_IO_REC_BUFFER; | 1043 | runtime->dma_addr = rme96->port + RME96_IO_REC_BUFFER; |
1042 | runtime->dma_bytes = RME96_BUFFER_SIZE; | 1044 | runtime->dma_bytes = RME96_BUFFER_SIZE; |
1043 | 1045 | ||