]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: rest of ALSA annotation
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 3 Jun 2004 12:38:17 +0000 (05:38 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 12:38:17 +0000 (05:38 -0700)
The rest of annotation for ALSA drivers; only OSS stuff left to do in
sound/*

include/sound/emux_synth.h
sound/pci/cs4281.c
sound/pci/cs46xx/cs46xx_lib.c
sound/pci/es1938.c
sound/pci/korg1212/korg1212.c
sound/pci/mixart/mixart.c
sound/pci/nm256/nm256.c
sound/pci/rme32.c
sound/pci/rme96.c
sound/synth/emux/soundfont.c

index b336e353a1f1f7cb088a490c84685d86c9e740ad..c6970aac9bdcfdf0bb700a39a51b0031d16de471 100644 (file)
@@ -60,7 +60,7 @@ typedef struct snd_emux_operators {
        void (*free_voice)(snd_emux_voice_t *vp);
        void (*reset)(snd_emux_t *emu, int ch);
        /* the first parameters are snd_emux_t */
-       int (*sample_new)(snd_emux_t *emu, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void *data, long count);
+       int (*sample_new)(snd_emux_t *emu, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *data, long count);
        int (*sample_free)(snd_emux_t *emu, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr);
        void (*sample_reset)(snd_emux_t *emu);
        int (*load_fx)(snd_emux_t *emu, int type, int arg, const void __user *data, long count);
index 287b7d4e995c7b505cea9cbb57d56915e3210186..91a60417e7ec467eb795eaeb7b4648d16c513993 100644 (file)
@@ -1185,7 +1185,7 @@ static void snd_cs4281_proc_read(snd_info_entry_t *entry,
 }
 
 static long snd_cs4281_BA0_read(snd_info_entry_t *entry, void *file_private_data,
-                               struct file *file, char *buf, long count)
+                               struct file *file, char __user *buf, long count)
 {
        long size;
        cs4281_t *chip = snd_magic_cast(cs4281_t, entry->private_data, return -ENXIO);
@@ -1202,7 +1202,7 @@ static long snd_cs4281_BA0_read(snd_info_entry_t *entry, void *file_private_data
 }
 
 static long snd_cs4281_BA1_read(snd_info_entry_t *entry, void *file_private_data,
-                               struct file *file, char *buf, long count)
+                               struct file *file, char __user *buf, long count)
 {
        long size;
        cs4281_t *chip = snd_magic_cast(cs4281_t, entry->private_data, return -ENXIO);
index 29861bb0ec867e0576220a9ebb2fc5dfe14cae97..9a1758396395b0ee487376ddd3f28802224c2054 100644 (file)
@@ -2866,7 +2866,7 @@ void __devinit snd_cs46xx_gameport(cs46xx_t *chip)
  */
 
 static long snd_cs46xx_io_read(snd_info_entry_t *entry, void *file_private_data,
-                              struct file *file, char *buf, long count)
+                              struct file *file, char __user *buf, long count)
 {
        long size;
        snd_cs46xx_region_t *region = (snd_cs46xx_region_t *)entry->private_data;
index 7924508aca38154115e54d154a7f9877ab92f61e..87afa49a0334eca61ac844def454e4de9084a9ba 100644 (file)
@@ -822,7 +822,7 @@ static snd_pcm_uframes_t snd_es1938_playback_pointer(snd_pcm_substream_t *substr
 static int snd_es1938_capture_copy(snd_pcm_substream_t *substream,
                                   int channel,
                                   snd_pcm_uframes_t pos,
-                                  void *dst,
+                                  void __user *dst,
                                   snd_pcm_uframes_t count)
 {
        snd_pcm_runtime_t *runtime = substream->runtime;
@@ -836,7 +836,7 @@ static int snd_es1938_capture_copy(snd_pcm_substream_t *substream,
        } else {
                if (copy_to_user(dst, runtime->dma_area + pos + 1, count - 1))
                        return -EFAULT;
-               if (put_user(runtime->dma_area[0], ((unsigned char *)dst) + count - 1))
+               if (put_user(runtime->dma_area[0], ((unsigned char __user *)dst) + count - 1))
                        return -EFAULT;
        }
        return 0;
index c2fc6e33914700080420c9cae112fec79a6aaa70..edd226021566b8ab187be39df941fa75a3e0bf84 100644 (file)
@@ -1328,7 +1328,7 @@ static int snd_korg1212_silence(korg1212_t *korg1212, int pos, int count, int of
        return 0;
 }
 
-static int snd_korg1212_copy_to(korg1212_t *korg1212, void *dst, int pos, int count, int offset, int size)
+static int snd_korg1212_copy_to(korg1212_t *korg1212, void __user *dst, int pos, int count, int offset, int size)
 {
        KorgAudioFrame * src =  korg1212->recordDataBufsPtr[0].bufferData + pos;
        int i, rc;
@@ -1346,7 +1346,7 @@ static int snd_korg1212_copy_to(korg1212_t *korg1212, void *dst, int pos, int co
                        return -EFAULT;
                }
 #endif
-               rc = copy_to_user((void*) dst + offset, src, size);
+               rc = copy_to_user(dst + offset, src, size);
                if (rc) {
 #if K1212_DEBUG_LEVEL > 0
                        K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_copy_to USER EFAULT src=%p dst=%p iter=%d\n", src, dst, i);
@@ -1360,7 +1360,7 @@ static int snd_korg1212_copy_to(korg1212_t *korg1212, void *dst, int pos, int co
        return 0;
 }
 
-static int snd_korg1212_copy_from(korg1212_t *korg1212, void *src, int pos, int count, int offset, int size)
+static int snd_korg1212_copy_from(korg1212_t *korg1212, void __user *src, int pos, int count, int offset, int size)
 {
        KorgAudioFrame * dst =  korg1212->playDataBufsPtr[0].bufferData + pos;
        int i, rc;
@@ -1671,7 +1671,7 @@ static snd_pcm_uframes_t snd_korg1212_capture_pointer(snd_pcm_substream_t *subst
 static int snd_korg1212_playback_copy(snd_pcm_substream_t *substream,
                         int channel, /* not used (interleaved data) */
                         snd_pcm_uframes_t pos,
-                        void *src,
+                        void __user *src,
                         snd_pcm_uframes_t count)
 {
         korg1212_t *korg1212 = _snd_pcm_substream_chip(substream);
@@ -1701,7 +1701,7 @@ static int snd_korg1212_playback_silence(snd_pcm_substream_t *substream,
 static int snd_korg1212_capture_copy(snd_pcm_substream_t *substream,
                         int channel, /* not used (interleaved data) */
                         snd_pcm_uframes_t pos,
-                        void *dst,
+                        void __user *dst,
                         snd_pcm_uframes_t count)
 {
         korg1212_t *korg1212 = _snd_pcm_substream_chip(substream);
index 4b1a5b20f919eecb71b08497cd3c704d79de6f6b..2b918cc7f529bb75c2339b8dbcc44609dc4549f4 100644 (file)
@@ -1154,7 +1154,7 @@ static long long snd_mixart_BA1_llseek(snd_info_entry_t *entry,
   mixart_BA0 proc interface for BAR 0 - read callback
  */
 static long snd_mixart_BA0_read(snd_info_entry_t *entry, void *file_private_data,
-                               struct file *file, char *buf, long count)
+                               struct file *file, char __user *buf, long count)
 {
        mixart_mgr_t *mgr = snd_magic_cast(mixart_mgr_t, entry->private_data, return -ENXIO);
 
@@ -1173,7 +1173,7 @@ static long snd_mixart_BA0_read(snd_info_entry_t *entry, void *file_private_data
   mixart_BA1 proc interface for BAR 1 - read callback
  */
 static long snd_mixart_BA1_read(snd_info_entry_t *entry, void *file_private_data,
-                               struct file *file, char *buf, long count)
+                               struct file *file, char __user *buf, long count)
 {
        mixart_mgr_t *mgr = snd_magic_cast(mixart_mgr_t, entry->private_data, return -ENXIO);
 
index 8a2fa86aa2caca01ae35df743c75f2b420dd6a9e..ee3b246bbef0e5f6e838cde913719908ab1dcffc 100644 (file)
@@ -684,7 +684,7 @@ static int
 snd_nm256_playback_copy(snd_pcm_substream_t *substream,
                        int channel, /* not used (interleaved data) */
                        snd_pcm_uframes_t pos,
-                       void *src,
+                       void __user *src,
                        snd_pcm_uframes_t count)
 {
        snd_pcm_runtime_t *runtime = substream->runtime;
index 1d19e7e08f3815857e0a8d01d4f10af6107bcff2..2f209664d0a207d847bceff0508477242471fabe 100644 (file)
@@ -298,7 +298,7 @@ static int snd_rme32_playback_silence(snd_pcm_substream_t * substream, int chann
 
 static int snd_rme32_playback_copy(snd_pcm_substream_t * substream, int channel,       /* not used (interleaved data) */
                                   snd_pcm_uframes_t pos,
-                                  void *src, snd_pcm_uframes_t count)
+                                  void __user *src, snd_pcm_uframes_t count)
 {
        rme32_t *rme32 = _snd_pcm_substream_chip(substream);
        count <<= rme32->playback_frlog;
@@ -311,7 +311,7 @@ static int snd_rme32_playback_copy(snd_pcm_substream_t * substream, int channel,
 
 static int snd_rme32_capture_copy(snd_pcm_substream_t * substream, int channel,        /* not used (interleaved data) */
                                  snd_pcm_uframes_t pos,
-                                 void *dst, snd_pcm_uframes_t count)
+                                 void __user *dst, snd_pcm_uframes_t count)
 {
        rme32_t *rme32 = _snd_pcm_substream_chip(substream);
        count <<= rme32->capture_frlog;
index cf1776b087009d901ed7d0816434666a2a6a2812..0e04ae457dbcadaba66051a20670cd061f6f5be4 100644 (file)
@@ -361,7 +361,7 @@ static int
 snd_rme96_playback_copy(snd_pcm_substream_t *substream,
                        int channel, /* not used (interleaved data) */
                        snd_pcm_uframes_t pos,
-                       void *src,
+                       void __user *src,
                        snd_pcm_uframes_t count)
 {
        rme96_t *rme96 = _snd_pcm_substream_chip(substream);
@@ -376,7 +376,7 @@ static int
 snd_rme96_capture_copy(snd_pcm_substream_t *substream,
                       int channel, /* not used (interleaved data) */
                       snd_pcm_uframes_t pos,
-                      void *dst,
+                      void __user *dst,
                       snd_pcm_uframes_t count)
 {
        rme96_t *rme96 = _snd_pcm_substream_chip(substream);
index a536d9f0505b5e582fb96769106774abfac0db5b..8db2e2db5ff1bdb6c230b52dc5c80174c85f9713 100644 (file)
@@ -34,7 +34,7 @@
 
 /* Prototypes for static functions */
 
-static int open_patch(snd_sf_list_t *sflist, const char *data, int count, int client);
+static int open_patch(snd_sf_list_t *sflist, const char __user *data, int count, int client);
 static snd_soundfont_t *newsf(snd_sf_list_t *sflist, int type, char *name);
 static int is_identical_font(snd_soundfont_t *sf, int type, unsigned char *name);
 static int close_patch(snd_sf_list_t *sflist);