From 52e441e408d7a585dd12800d239c971c875a2192 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Thu, 3 Jun 2004 02:48:01 -0700 Subject: [PATCH] [PATCH] sparse: annotation of include/sound (generic parts) Annotated method prototypes, commonly used ioctl-only structures and generic helpers. Instances of methods in drivers are _not_ annotated at that point - they will go with driver patches --- include/sound/ainstr_gf1.h | 4 ++-- include/sound/ainstr_iw.h | 4 ++-- include/sound/ainstr_simple.h | 4 ++-- include/sound/asound.h | 8 ++++---- include/sound/hwdep.h | 4 ++-- include/sound/info.h | 4 ++-- include/sound/pcm.h | 13 +++++++------ include/sound/seq_instr.h | 4 ++-- 8 files changed, 23 insertions(+), 22 deletions(-) diff --git a/include/sound/ainstr_gf1.h b/include/sound/ainstr_gf1.h index 882d17b395ff4..c59f737657b81 100644 --- a/include/sound/ainstr_gf1.h +++ b/include/sound/ainstr_gf1.h @@ -209,9 +209,9 @@ typedef struct { void *private_data; int (*info)(void *private_data, gf1_info_t *info); int (*put_sample)(void *private_data, gf1_wave_t *wave, - char *data, long len, int atomic); + char __user *data, long len, int atomic); int (*get_sample)(void *private_data, gf1_wave_t *wave, - char *data, long len, int atomic); + char __user *data, long len, int atomic); int (*remove_sample)(void *private_data, gf1_wave_t *wave, int atomic); void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); diff --git a/include/sound/ainstr_iw.h b/include/sound/ainstr_iw.h index ace103158854b..1b5155fb1087f 100644 --- a/include/sound/ainstr_iw.h +++ b/include/sound/ainstr_iw.h @@ -357,9 +357,9 @@ typedef struct { void *private_data; int (*info)(void *private_data, iwffff_info_t *info); int (*put_sample)(void *private_data, iwffff_wave_t *wave, - char *data, long len, int atomic); + char __user *data, long len, int atomic); int (*get_sample)(void *private_data, iwffff_wave_t *wave, - char *data, long len, int atomic); + char __user *data, long len, int atomic); int (*remove_sample)(void *private_data, iwffff_wave_t *wave, int atomic); void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); diff --git a/include/sound/ainstr_simple.h b/include/sound/ainstr_simple.h index bef1f990c69e4..da73df0b1d348 100644 --- a/include/sound/ainstr_simple.h +++ b/include/sound/ainstr_simple.h @@ -140,9 +140,9 @@ typedef struct { void *private_data; int (*info)(void *private_data, simple_instrument_info_t *info); int (*put_sample)(void *private_data, simple_instrument_t *instr, - char *data, long len, int atomic); + char __user *data, long len, int atomic); int (*get_sample)(void *private_data, simple_instrument_t *instr, - char *data, long len, int atomic); + char __user *data, long len, int atomic); int (*remove_sample)(void *private_data, simple_instrument_t *instr, int atomic); void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); diff --git a/include/sound/asound.h b/include/sound/asound.h index 62841fe156ae4..69dc1829eba9b 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -135,7 +135,7 @@ struct sndrv_hwdep_dsp_status { struct sndrv_hwdep_dsp_image { unsigned int index; /* W: DSP index */ unsigned char name[64]; /* W: ID (e.g. file name) */ - unsigned char *image; /* W: binary image */ + unsigned char __user *image; /* W: binary image */ size_t length; /* W: size of image in bytes */ unsigned long driver_data; /* W: driver-specific data */ }; @@ -446,13 +446,13 @@ struct sndrv_pcm_sync_ptr { struct sndrv_xferi { sndrv_pcm_sframes_t result; - void *buf; + void __user *buf; sndrv_pcm_uframes_t frames; }; struct sndrv_xfern { sndrv_pcm_sframes_t result; - void **bufs; + void __user * __user *bufs; sndrv_pcm_uframes_t frames; }; @@ -776,7 +776,7 @@ struct sndrv_ctl_elem_list { unsigned int space; /* W: count of element IDs to get */ unsigned int used; /* R: count of element IDs set */ unsigned int count; /* R: count of all elements */ - struct sndrv_ctl_elem_id *pids; /* R: IDs */ + struct sndrv_ctl_elem_id __user *pids; /* R: IDs */ unsigned char reserved[50]; }; diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h index 5e72865bd4c1c..4a4cc0167fac3 100644 --- a/include/sound/hwdep.h +++ b/include/sound/hwdep.h @@ -32,8 +32,8 @@ typedef struct sndrv_hwdep_dsp_image snd_hwdep_dsp_image_t; typedef struct _snd_hwdep_ops { long long (*llseek) (snd_hwdep_t *hw, struct file * file, long long offset, int orig); - long (*read) (snd_hwdep_t * hw, char *buf, long count, loff_t *offset); - long (*write) (snd_hwdep_t * hw, const char *buf, long count, loff_t *offset); + long (*read) (snd_hwdep_t * hw, char __user *buf, long count, loff_t *offset); + long (*write) (snd_hwdep_t * hw, const char __user *buf, long count, loff_t *offset); int (*open) (snd_hwdep_t * hw, struct file * file); int (*release) (snd_hwdep_t * hw, struct file * file); unsigned int (*poll) (snd_hwdep_t * hw, struct file * file, poll_table * wait); diff --git a/include/sound/info.h b/include/sound/info.h index 57ba588d04a5a..9e33b58b8cced 100644 --- a/include/sound/info.h +++ b/include/sound/info.h @@ -54,9 +54,9 @@ struct snd_info_entry_ops { int (*release) (snd_info_entry_t * entry, unsigned short mode, void *file_private_data); long (*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 (*write) (snd_info_entry_t *entry, void *file_private_data, - struct file * file, const char *buf, long count); + struct file * file, const char __user *buf, long count); long long (*llseek) (snd_info_entry_t *entry, void *file_private_data, struct file * file, long long offset, int orig); unsigned int (*poll) (snd_info_entry_t *entry, void *file_private_data, diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 17d8b22090df8..42293603dac57 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -95,7 +95,7 @@ typedef struct _snd_pcm_ops { int (*trigger)(snd_pcm_substream_t * substream, int cmd); snd_pcm_uframes_t (*pointer)(snd_pcm_substream_t * substream); int (*copy)(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, - void *buf, snd_pcm_uframes_t count); + void __user *buf, snd_pcm_uframes_t count); int (*silence)(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, snd_pcm_uframes_t count); struct page *(*page)(snd_pcm_substream_t *substream, unsigned long offset); @@ -479,7 +479,7 @@ int snd_pcm_notify(snd_pcm_notify_t *notify, int nfree); extern rwlock_t snd_pcm_link_rwlock; int snd_pcm_info(snd_pcm_substream_t * substream, snd_pcm_info_t *info); -int snd_pcm_info_user(snd_pcm_substream_t * substream, snd_pcm_info_t *info); +int snd_pcm_info_user(snd_pcm_substream_t * substream, snd_pcm_info_t __user *info); int snd_pcm_status(snd_pcm_substream_t * substream, snd_pcm_status_t *status); int snd_pcm_prepare(snd_pcm_substream_t *substream); int snd_pcm_start(snd_pcm_substream_t *substream); @@ -881,13 +881,14 @@ void snd_pcm_tick_set(snd_pcm_substream_t *substream, unsigned long ticks); void snd_pcm_tick_elapsed(snd_pcm_substream_t *substream); void snd_pcm_period_elapsed(snd_pcm_substream_t *substream); snd_pcm_sframes_t snd_pcm_lib_write(snd_pcm_substream_t *substream, - const void *buf, snd_pcm_uframes_t frames); + const void __user *buf, + snd_pcm_uframes_t frames); snd_pcm_sframes_t snd_pcm_lib_read(snd_pcm_substream_t *substream, - void *buf, snd_pcm_uframes_t frames); + void __user *buf, snd_pcm_uframes_t frames); snd_pcm_sframes_t snd_pcm_lib_writev(snd_pcm_substream_t *substream, - void **bufs, snd_pcm_uframes_t frames); + void __user **bufs, snd_pcm_uframes_t frames); snd_pcm_sframes_t snd_pcm_lib_readv(snd_pcm_substream_t *substream, - void **bufs, snd_pcm_uframes_t frames); + void __user **bufs, snd_pcm_uframes_t frames); int snd_pcm_limit_hw_rates(snd_pcm_runtime_t *runtime); diff --git a/include/sound/seq_instr.h b/include/sound/seq_instr.h index 832d8f53245eb..1a654df4aa978 100644 --- a/include/sound/seq_instr.h +++ b/include/sound/seq_instr.h @@ -79,9 +79,9 @@ struct snd_seq_kinstr_ops { char *instr_type; int (*info)(void *private_data, char *info_data, long len); int (*put)(void *private_data, snd_seq_kinstr_t *kinstr, - char *instr_data, long len, int atomic, int cmd); + char __user *instr_data, long len, int atomic, int cmd); int (*get)(void *private_data, snd_seq_kinstr_t *kinstr, - char *instr_data, long len, int atomic, int cmd); + char __user *instr_data, long len, int atomic, int cmd); int (*get_size)(void *private_data, snd_seq_kinstr_t *kinstr, long *size); int (*remove)(void *private_data, snd_seq_kinstr_t *kinstr, int atomic); void (*notify)(void *private_data, snd_seq_kinstr_t *kinstr, int what); -- 2.53.0