]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: rest of sound/core
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 3 Jun 2004 11:18:49 +0000 (04:18 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 11:18:49 +0000 (04:18 -0700)
The rest of sond/core annotated; reverted bogus addition of __user in
snd_seq_kernel_client_ctl() - I should've guessed from the name alone
;-)

include/sound/seq_kernel.h
sound/core/oss/mixer_oss.c
sound/core/oss/pcm_oss.c
sound/core/seq/instr/ainstr_fm.c
sound/core/seq/instr/ainstr_gf1.c
sound/core/seq/instr/ainstr_iw.c
sound/core/seq/instr/ainstr_simple.c
sound/core/seq/seq_clientmgr.c
sound/core/seq/seq_memory.c

index 22dd3a4eccbd06d3e5dde359d15fc83e13c8e21b..d0b69fbef92413d57928c60faa347e99f9d86bd3 100644 (file)
@@ -158,7 +158,7 @@ extern int snd_seq_create_kernel_client(snd_card_t *card, int client_index, snd_
 extern int snd_seq_delete_kernel_client(int client);
 extern int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t *ev, int atomic, int hop);
 extern int snd_seq_kernel_client_dispatch(int client, snd_seq_event_t *ev, int atomic, int hop);
-extern int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void __user *arg);
+extern int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
 
 #define SNDRV_SEQ_EXT_MASK     0xc0000000
 #define SNDRV_SEQ_EXT_USRPTR   0x80000000
index 8e7efafee93a9ecfedf3f8504feb88cad29ab186..d8359d301806233fd1195a4836365b10d551c8dd 100644 (file)
@@ -81,7 +81,7 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file)
 }
 
 static int snd_mixer_oss_info(snd_mixer_oss_file_t *fmixer,
-                             mixer_info *_info)
+                             mixer_info __user *_info)
 {
        snd_card_t *card = fmixer->card;
        snd_mixer_oss_t *mixer = fmixer->mixer;
@@ -97,7 +97,7 @@ static int snd_mixer_oss_info(snd_mixer_oss_file_t *fmixer,
 }
 
 static int snd_mixer_oss_info_obsolete(snd_mixer_oss_file_t *fmixer,
-                                      _old_mixer_info *_info)
+                                      _old_mixer_info __user *_info)
 {
        snd_card_t *card = fmixer->card;
        snd_mixer_oss_t *mixer = fmixer->mixer;
@@ -293,65 +293,67 @@ static int snd_mixer_oss_set_volume(snd_mixer_oss_file_t *fmixer,
 
 static int snd_mixer_oss_ioctl1(snd_mixer_oss_file_t *fmixer, unsigned int cmd, unsigned long arg)
 {
+       void __user *argp = (void __user *)arg;
+       int __user *p = argp;
        int tmp;
 
        snd_assert(fmixer != NULL, return -ENXIO);
        if (((cmd >> 8) & 0xff) == 'M') {
                switch (cmd) {
                case SOUND_MIXER_INFO:
-                       return snd_mixer_oss_info(fmixer, (mixer_info *)arg);
+                       return snd_mixer_oss_info(fmixer, argp);
                case SOUND_OLD_MIXER_INFO:
-                       return snd_mixer_oss_info_obsolete(fmixer, (_old_mixer_info *)arg);
+                       return snd_mixer_oss_info_obsolete(fmixer, argp);
                case SOUND_MIXER_WRITE_RECSRC:
-                       if (get_user(tmp, (int *)arg))
+                       if (get_user(tmp, p))
                                return -EFAULT;
                        tmp = snd_mixer_oss_set_recsrc(fmixer, tmp);
                        if (tmp < 0)
                                return tmp;
-                       return put_user(tmp, (int *)arg);
+                       return put_user(tmp, p);
                case OSS_GETVERSION:
-                       return put_user(SNDRV_OSS_VERSION, (int *) arg);
+                       return put_user(SNDRV_OSS_VERSION, p);
                case OSS_ALSAEMULVER:
-                       return put_user(1, (int *) arg);
+                       return put_user(1, p);
                case SOUND_MIXER_READ_DEVMASK:
                        tmp = snd_mixer_oss_devmask(fmixer);
                        if (tmp < 0)
                                return tmp;
-                       return put_user(tmp, (int *)arg);
+                       return put_user(tmp, p);
                case SOUND_MIXER_READ_STEREODEVS:
                        tmp = snd_mixer_oss_stereodevs(fmixer);
                        if (tmp < 0)
                                return tmp;
-                       return put_user(tmp, (int *)arg);
+                       return put_user(tmp, p);
                case SOUND_MIXER_READ_RECMASK:
                        tmp = snd_mixer_oss_recmask(fmixer);
                        if (tmp < 0)
                                return tmp;
-                       return put_user(tmp, (int *)arg);
+                       return put_user(tmp, p);
                case SOUND_MIXER_READ_CAPS:
                        tmp = snd_mixer_oss_caps(fmixer);
                        if (tmp < 0)
                                return tmp;
-                       return put_user(tmp, (int *)arg);
+                       return put_user(tmp, p);
                case SOUND_MIXER_READ_RECSRC:
                        tmp = snd_mixer_oss_get_recsrc(fmixer);
                        if (tmp < 0)
                                return tmp;
-                       return put_user(tmp, (int *)arg);
+                       return put_user(tmp, p);
                }
        }
        if (cmd & SIOC_IN) {
-               if (get_user(tmp, (int *)arg))
+               if (get_user(tmp, p))
                        return -EFAULT;
                tmp = snd_mixer_oss_set_volume(fmixer, cmd & 0xff, tmp);
                if (tmp < 0)
                        return tmp;
-               return put_user(tmp, (int *)arg);
+               return put_user(tmp, p);
        } else if (cmd & SIOC_OUT) {
                tmp = snd_mixer_oss_get_volume(fmixer, cmd & 0xff);
                if (tmp < 0)
                        return tmp;
-               return put_user(tmp, (int *)arg);
+               return put_user(tmp, p);
        }
        return -ENXIO;
 }
index 75cea7e2463ea39f33e0995d608bfae0a816d742..65b5017e46e6bd353ed7e6b59d475713af7c44a1 100644 (file)
@@ -806,7 +806,7 @@ static ssize_t snd_pcm_oss_write2(snd_pcm_substream_t *substream, const char *bu
        return bytes;
 }
 
-static ssize_t snd_pcm_oss_write1(snd_pcm_substream_t *substream, const char *buf, size_t bytes)
+static ssize_t snd_pcm_oss_write1(snd_pcm_substream_t *substream, const char __user *buf, size_t bytes)
 {
        size_t xfer = 0;
        ssize_t tmp;
@@ -883,7 +883,7 @@ static ssize_t snd_pcm_oss_read2(snd_pcm_substream_t *substream, char *buf, size
        return bytes;
 }
 
-static ssize_t snd_pcm_oss_read1(snd_pcm_substream_t *substream, char *buf, size_t bytes)
+static ssize_t snd_pcm_oss_read1(snd_pcm_substream_t *substream, char __user *buf, size_t bytes)
 {
        size_t xfer = 0;
        ssize_t tmp;
@@ -1067,9 +1067,9 @@ static int snd_pcm_oss_sync(snd_pcm_oss_file_t *pcm_oss_file)
                                        snd_pcm_lib_write(substream, runtime->oss.buffer, size1);
                                }
                        } else if (runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) {
-                               void *buffers[runtime->channels];
+                               void __user *buffers[runtime->channels];
                                memset(buffers, 0, runtime->channels * sizeof(void *));
-                               snd_pcm_lib_writev(substream, (void **)buffers, size);
+                               snd_pcm_lib_writev(substream, buffers, size);
                        }
                }
                /*
@@ -1468,7 +1468,7 @@ static int snd_pcm_oss_get_odelay(snd_pcm_oss_file_t *pcm_oss_file)
        return snd_pcm_oss_bytes(substream, delay);
 }
 
-static int snd_pcm_oss_get_ptr(snd_pcm_oss_file_t *pcm_oss_file, int stream, struct count_info * _info)
+static int snd_pcm_oss_get_ptr(snd_pcm_oss_file_t *pcm_oss_file, int stream, struct count_info __user * _info)
 {      
        snd_pcm_substream_t *substream;
        snd_pcm_runtime_t *runtime;
@@ -1530,7 +1530,7 @@ static int snd_pcm_oss_get_ptr(snd_pcm_oss_file_t *pcm_oss_file, int stream, str
        return 0;
 }
 
-static int snd_pcm_oss_get_space(snd_pcm_oss_file_t *pcm_oss_file, int stream, struct audio_buf_info *_info)
+static int snd_pcm_oss_get_space(snd_pcm_oss_file_t *pcm_oss_file, int stream, struct audio_buf_info __user *_info)
 {
        snd_pcm_substream_t *substream;
        snd_pcm_runtime_t *runtime;
@@ -1589,7 +1589,7 @@ static int snd_pcm_oss_get_space(snd_pcm_oss_file_t *pcm_oss_file, int stream, s
        return 0;
 }
 
-static int snd_pcm_oss_get_mapbuf(snd_pcm_oss_file_t *pcm_oss_file, int stream, struct buffmem_desc * _info)
+static int snd_pcm_oss_get_mapbuf(snd_pcm_oss_file_t *pcm_oss_file, int stream, struct buffmem_desc __user * _info)
 {
        // it won't be probably implemented
        // snd_printd("TODO: snd_pcm_oss_get_mapbuf\n");
@@ -1912,13 +1912,14 @@ static int snd_pcm_oss_ioctl(struct inode *inode, struct file *file,
                              unsigned int cmd, unsigned long arg)
 {
        snd_pcm_oss_file_t *pcm_oss_file;
+       int __user *p = (int __user *)arg;
        int res;
 
        pcm_oss_file = snd_magic_cast(snd_pcm_oss_file_t, file->private_data, return -ENXIO);
        if (cmd == OSS_GETVERSION)
-               return put_user(SNDRV_OSS_VERSION, (int *)arg);
+               return put_user(SNDRV_OSS_VERSION, p);
        if (cmd == OSS_ALSAEMULVER)
-               return put_user(1, (int *)arg);
+               return put_user(1, p);
 #if defined(CONFIG_SND_MIXER_OSS) || (defined(MODULE) && defined(CONFIG_SND_MIXER_OSS_MODULE))
        if (((cmd >> 8) & 0xff) == 'M') {       /* mixer ioctl - for OSS compatibility */
                snd_pcm_substream_t *substream;
@@ -1943,93 +1944,93 @@ static int snd_pcm_oss_ioctl(struct inode *inode, struct file *file,
        case SNDCTL_DSP_SYNC:
                return snd_pcm_oss_sync(pcm_oss_file);
        case SNDCTL_DSP_SPEED:
-               if (get_user(res, (int *)arg))
+               if (get_user(res, p))
                        return -EFAULT;
                if ((res = snd_pcm_oss_set_rate(pcm_oss_file, res))<0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SOUND_PCM_READ_RATE:
                res = snd_pcm_oss_get_rate(pcm_oss_file);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SNDCTL_DSP_STEREO:
-               if (get_user(res, (int *)arg))
+               if (get_user(res, p))
                        return -EFAULT;
                res = res > 0 ? 2 : 1;
                if ((res = snd_pcm_oss_set_channels(pcm_oss_file, res)) < 0)
                        return res;
-               return put_user(--res, (int *)arg);
+               return put_user(--res, p);
        case SNDCTL_DSP_GETBLKSIZE:
                res = snd_pcm_oss_get_block_size(pcm_oss_file);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SNDCTL_DSP_SETFMT:
-               if (get_user(res, (int *)arg))
+               if (get_user(res, p))
                        return -EFAULT;
                res = snd_pcm_oss_set_format(pcm_oss_file, res);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SOUND_PCM_READ_BITS:
                res = snd_pcm_oss_get_format(pcm_oss_file);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SNDCTL_DSP_CHANNELS:
-               if (get_user(res, (int *)arg))
+               if (get_user(res, p))
                        return -EFAULT;
                res = snd_pcm_oss_set_channels(pcm_oss_file, res);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SOUND_PCM_READ_CHANNELS:
                res = snd_pcm_oss_get_channels(pcm_oss_file);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SOUND_PCM_WRITE_FILTER:
        case SOUND_PCM_READ_FILTER:
                return -EIO;
        case SNDCTL_DSP_POST:
                return snd_pcm_oss_post(pcm_oss_file);
        case SNDCTL_DSP_SUBDIVIDE:
-               if (get_user(res, (int *)arg))
+               if (get_user(res, p))
                        return -EFAULT;
                res = snd_pcm_oss_set_subdivide(pcm_oss_file, res);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SNDCTL_DSP_SETFRAGMENT:
-               if (get_user(res, (int *)arg))
+               if (get_user(res, p))
                        return -EFAULT;
                return snd_pcm_oss_set_fragment(pcm_oss_file, res);
        case SNDCTL_DSP_GETFMTS:
                res = snd_pcm_oss_get_formats(pcm_oss_file);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SNDCTL_DSP_GETOSPACE:
        case SNDCTL_DSP_GETISPACE:
                return snd_pcm_oss_get_space(pcm_oss_file,
                        cmd == SNDCTL_DSP_GETISPACE ?
                                SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK,
-                       (struct audio_buf_info *) arg);
+                       (struct audio_buf_info __user *) arg);
        case SNDCTL_DSP_NONBLOCK:
                return snd_pcm_oss_nonblock(file);
        case SNDCTL_DSP_GETCAPS:
                res = snd_pcm_oss_get_caps(pcm_oss_file);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SNDCTL_DSP_GETTRIGGER:
                res = snd_pcm_oss_get_trigger(pcm_oss_file);
                if (res < 0)
                        return res;
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SNDCTL_DSP_SETTRIGGER:
-               if (get_user(res, (int *)arg))
+               if (get_user(res, p))
                        return -EFAULT;
                return snd_pcm_oss_set_trigger(pcm_oss_file, res);
        case SNDCTL_DSP_GETIPTR:
@@ -2037,13 +2038,13 @@ static int snd_pcm_oss_ioctl(struct inode *inode, struct file *file,
                return snd_pcm_oss_get_ptr(pcm_oss_file,
                        cmd == SNDCTL_DSP_GETIPTR ?
                                SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK,
-                       (struct count_info *) arg);
+                       (struct count_info __user *) arg);
        case SNDCTL_DSP_MAPINBUF:
        case SNDCTL_DSP_MAPOUTBUF:
                return snd_pcm_oss_get_mapbuf(pcm_oss_file,
                        cmd == SNDCTL_DSP_MAPINBUF ?
                                SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK,
-                       (struct buffmem_desc *) arg);
+                       (struct buffmem_desc __user *) arg);
        case SNDCTL_DSP_SETSYNCRO:
                /* stop DMA now.. */
                return 0;
@@ -2055,10 +2056,10 @@ static int snd_pcm_oss_ioctl(struct inode *inode, struct file *file,
                res = snd_pcm_oss_get_odelay(pcm_oss_file);
                if (res < 0) {
                        /* it's for sure, some broken apps don't check for error codes */
-                       put_user(0, (int *)arg);
+                       put_user(0, p);
                        return res;
                }
-               return put_user(res, (int *)arg);
+               return put_user(res, p);
        case SNDCTL_DSP_PROFILE:
                return 0;       /* silently ignore */
        default:
@@ -2067,7 +2068,7 @@ static int snd_pcm_oss_ioctl(struct inode *inode, struct file *file,
        return -EINVAL;
 }
 
-static ssize_t snd_pcm_oss_read(struct file *file, char *buf, size_t count, loff_t *offset)
+static ssize_t snd_pcm_oss_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
        snd_pcm_oss_file_t *pcm_oss_file;
        snd_pcm_substream_t *substream;
@@ -2087,7 +2088,7 @@ static ssize_t snd_pcm_oss_read(struct file *file, char *buf, size_t count, loff
 #endif
 }
 
-static ssize_t snd_pcm_oss_write(struct file *file, const char *buf, size_t count, loff_t *offset)
+static ssize_t snd_pcm_oss_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
 {
        snd_pcm_oss_file_t *pcm_oss_file;
        snd_pcm_substream_t *substream;
index aabb0c2bb3dfb4aa816a4dd77b53fbdf816ae5e2..648a7b89c51af1086192f7cade594da4a31b5ac1 100644 (file)
@@ -35,7 +35,7 @@ MODULE_SUPPORTED_DEVICE("sound");
 char *snd_seq_fm_id = SNDRV_SEQ_INSTR_ID_OPL2_3;
 
 static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
-                         char *instr_data, long len, int atomic, int cmd)
+                         char __user *instr_data, long len, int atomic, int cmd)
 {
        fm_instrument_t *ip;
        fm_xinstrument_t ix;
@@ -77,7 +77,8 @@ static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
 }
 
 static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr,
-                         char *instr_data, long len, int atomic, int cmd)
+                         char __user *instr_data, long len, int atomic,
+                         int cmd)
 {
        fm_instrument_t *ip;
        fm_xinstrument_t ix;
index d1029dfdd76216c694b46b1ce0ecb249d585b8e5..13b46beff5853bec25fc8ad36d58e17be2080197 100644 (file)
@@ -48,7 +48,7 @@ static unsigned int snd_seq_gf1_size(unsigned int size, unsigned int format)
 
 static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
                                             gf1_instrument_t *ip,
-                                            char **data,
+                                            char __user **data,
                                             long *len,
                                             int atomic)
 {
@@ -141,7 +141,8 @@ static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops,
 }
 
 static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
-                          char *instr_data, long len, int atomic, int cmd)
+                          char __user *instr_data, long len, int atomic,
+                          int cmd)
 {
        snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
        gf1_instrument_t *ip;
@@ -192,7 +193,7 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
 
 static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops,
                                           gf1_instrument_t *ip,
-                                          char **data,
+                                          char __user **data,
                                           long *len,
                                           int atomic)
 {
@@ -253,7 +254,8 @@ static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops,
 }
 
 static int snd_seq_gf1_get(void *private_data, snd_seq_kinstr_t *instr,
-                          char *instr_data, long len, int atomic, int cmd)
+                          char __user *instr_data, long len, int atomic,
+                          int cmd)
 {
        snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
        gf1_instrument_t *ip;
index 121e09cde3bc8a1055c05d3e669707163e6bcb0d..cd9ea55455bedecf14452f15924176e371806859 100644 (file)
@@ -60,7 +60,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
                                               iwffff_layer_t *lp,
                                               iwffff_env_t *ep,
                                               iwffff_xenv_t *ex,
-                                              char **data,
+                                              char __user **data,
                                               long *len,
                                               int gfp_mask)
 {
@@ -126,7 +126,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
 
 static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
                                                iwffff_layer_t *lp,
-                                               char **data,
+                                               char __user **data,
                                                long *len,
                                                int atomic)
 {
@@ -230,7 +230,8 @@ static void snd_seq_iwffff_instr_free(snd_iwffff_ops_t *ops,
 }
 
 static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
-                             char *instr_data, long len, int atomic, int cmd)
+                             char __user *instr_data, long len, int atomic,
+                             int cmd)
 {
        snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
        iwffff_instrument_t *ip;
@@ -350,7 +351,7 @@ static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
                                             iwffff_layer_t *lp,
                                             iwffff_xenv_t *ex,
                                             iwffff_env_t *ep,
-                                            char **data,
+                                            char __user **data,
                                             long *len)
 {
        iwffff_env_record_t *rp;
@@ -395,7 +396,7 @@ static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
 
 static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops,
                                              iwffff_layer_t *lp,
-                                             char **data,
+                                             char __user **data,
                                              long *len,
                                              int atomic)
 {
@@ -449,14 +450,14 @@ static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops,
 }
 
 static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr,
-                             char *instr_data, long len, int atomic, int cmd)
+                             char __user *instr_data, long len, int atomic, int cmd)
 {
        snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
        iwffff_instrument_t *ip;
        iwffff_xinstrument_t ix;
        iwffff_layer_t *lp;
        iwffff_xlayer_t lx;
-       char *layer_instr_data;
+       char __user *layer_instr_data;
        int err;
        
        if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL)
index 575b1e86b4b8953985ba67a1d1de9bf4b298a380..0f811783889f579356123dc9f7c000793a69c17d 100644 (file)
@@ -55,7 +55,8 @@ static void snd_seq_simple_instr_free(snd_simple_ops_t *ops,
 }
 
 static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
-                             char *instr_data, long len, int atomic, int cmd)
+                             char __user *instr_data, long len,
+                             int atomic, int cmd)
 {
        snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
        simple_instrument_t *ip;
@@ -103,7 +104,8 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
 }
 
 static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr,
-                             char *instr_data, long len, int atomic, int cmd)
+                             char __user *instr_data, long len,
+                             int atomic, int cmd)
 {
        snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
        simple_instrument_t *ip;
index 40fef22f5bc8f1161b5fe729f7cce20497c2587c..9e67d06da3c2c244543a12e84c1063661ff70764 100644 (file)
@@ -2154,17 +2154,17 @@ static int snd_seq_do_ioctl(client_t *client, unsigned int cmd, void __user *arg
        switch (cmd) {
        case SNDRV_SEQ_IOCTL_PVERSION:
                /* return sequencer version number */
-               return put_user(SNDRV_SEQ_VERSION, (int *)arg) ? -EFAULT : 0;
+               return put_user(SNDRV_SEQ_VERSION, (int __user *)arg) ? -EFAULT : 0;
        case SNDRV_SEQ_IOCTL_CLIENT_ID:
                /* return the id of this client */
-               return put_user(client->number, (int *)arg) ? -EFAULT : 0;
+               return put_user(client->number, (int __user *)arg) ? -EFAULT : 0;
        }
 
        if (! arg)
                return -EFAULT;
        for (p = ioctl_tables; p->cmd; p++) {
                if (p->cmd == cmd)
-                       return p->func(client, (void __user *) arg);
+                       return p->func(client, arg);
        }
        snd_printd("seq unknown ioctl() 0x%x (type='%c', number=0x%2x)\n",
                   cmd, _IOC_TYPE(cmd), _IOC_NR(cmd));
@@ -2348,7 +2348,7 @@ int snd_seq_kernel_client_dispatch(int client, snd_seq_event_t * ev,
  * exported, called by kernel clients to perform same functions as with
  * userland ioctl() 
  */
-int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void __user *arg)
+int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg)
 {
        client_t *client;
        mm_segment_t fs;
index 298cfd31752443bafc2c7448533faa1251b5fb15..fbcfd3c8a07019b7fc745902e5db5fcb1523e8c0 100644 (file)
@@ -90,7 +90,7 @@ int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t fun
 
        if (event->data.ext.len & SNDRV_SEQ_EXT_USRPTR) {
                char buf[32];
-               char *curptr = event->data.ext.ptr;
+               char __user *curptr = event->data.ext.ptr;
                while (len > 0) {
                        int size = sizeof(buf);
                        if (len < size)