Commit 52e441e4 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[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
parent 3f85e843
...@@ -209,9 +209,9 @@ typedef struct { ...@@ -209,9 +209,9 @@ typedef struct {
void *private_data; void *private_data;
int (*info)(void *private_data, gf1_info_t *info); int (*info)(void *private_data, gf1_info_t *info);
int (*put_sample)(void *private_data, gf1_wave_t *wave, 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, 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 (*remove_sample)(void *private_data, gf1_wave_t *wave,
int atomic); int atomic);
void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
......
...@@ -357,9 +357,9 @@ typedef struct { ...@@ -357,9 +357,9 @@ typedef struct {
void *private_data; void *private_data;
int (*info)(void *private_data, iwffff_info_t *info); int (*info)(void *private_data, iwffff_info_t *info);
int (*put_sample)(void *private_data, iwffff_wave_t *wave, 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, 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 (*remove_sample)(void *private_data, iwffff_wave_t *wave,
int atomic); int atomic);
void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
......
...@@ -140,9 +140,9 @@ typedef struct { ...@@ -140,9 +140,9 @@ typedef struct {
void *private_data; void *private_data;
int (*info)(void *private_data, simple_instrument_info_t *info); int (*info)(void *private_data, simple_instrument_info_t *info);
int (*put_sample)(void *private_data, simple_instrument_t *instr, 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, 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 (*remove_sample)(void *private_data, simple_instrument_t *instr,
int atomic); int atomic);
void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
......
...@@ -135,7 +135,7 @@ struct sndrv_hwdep_dsp_status { ...@@ -135,7 +135,7 @@ struct sndrv_hwdep_dsp_status {
struct sndrv_hwdep_dsp_image { struct sndrv_hwdep_dsp_image {
unsigned int index; /* W: DSP index */ unsigned int index; /* W: DSP index */
unsigned char name[64]; /* W: ID (e.g. file name) */ 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 */ size_t length; /* W: size of image in bytes */
unsigned long driver_data; /* W: driver-specific data */ unsigned long driver_data; /* W: driver-specific data */
}; };
...@@ -446,13 +446,13 @@ struct sndrv_pcm_sync_ptr { ...@@ -446,13 +446,13 @@ struct sndrv_pcm_sync_ptr {
struct sndrv_xferi { struct sndrv_xferi {
sndrv_pcm_sframes_t result; sndrv_pcm_sframes_t result;
void *buf; void __user *buf;
sndrv_pcm_uframes_t frames; sndrv_pcm_uframes_t frames;
}; };
struct sndrv_xfern { struct sndrv_xfern {
sndrv_pcm_sframes_t result; sndrv_pcm_sframes_t result;
void **bufs; void __user * __user *bufs;
sndrv_pcm_uframes_t frames; sndrv_pcm_uframes_t frames;
}; };
...@@ -776,7 +776,7 @@ struct sndrv_ctl_elem_list { ...@@ -776,7 +776,7 @@ struct sndrv_ctl_elem_list {
unsigned int space; /* W: count of element IDs to get */ unsigned int space; /* W: count of element IDs to get */
unsigned int used; /* R: count of element IDs set */ unsigned int used; /* R: count of element IDs set */
unsigned int count; /* R: count of all elements */ 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]; unsigned char reserved[50];
}; };
......
...@@ -32,8 +32,8 @@ typedef struct sndrv_hwdep_dsp_image snd_hwdep_dsp_image_t; ...@@ -32,8 +32,8 @@ typedef struct sndrv_hwdep_dsp_image snd_hwdep_dsp_image_t;
typedef struct _snd_hwdep_ops { typedef struct _snd_hwdep_ops {
long long (*llseek) (snd_hwdep_t *hw, struct file * file, long long offset, int orig); 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 (*read) (snd_hwdep_t * hw, char __user *buf, long count, loff_t *offset);
long (*write) (snd_hwdep_t * hw, const char *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 (*open) (snd_hwdep_t * hw, struct file * file);
int (*release) (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); unsigned int (*poll) (snd_hwdep_t * hw, struct file * file, poll_table * wait);
......
...@@ -54,9 +54,9 @@ struct snd_info_entry_ops { ...@@ -54,9 +54,9 @@ struct snd_info_entry_ops {
int (*release) (snd_info_entry_t * entry, int (*release) (snd_info_entry_t * entry,
unsigned short mode, void *file_private_data); unsigned short mode, void *file_private_data);
long (*read) (snd_info_entry_t *entry, 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, 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, long long (*llseek) (snd_info_entry_t *entry, void *file_private_data,
struct file * file, long long offset, int orig); struct file * file, long long offset, int orig);
unsigned int (*poll) (snd_info_entry_t *entry, void *file_private_data, unsigned int (*poll) (snd_info_entry_t *entry, void *file_private_data,
......
...@@ -95,7 +95,7 @@ typedef struct _snd_pcm_ops { ...@@ -95,7 +95,7 @@ typedef struct _snd_pcm_ops {
int (*trigger)(snd_pcm_substream_t * substream, int cmd); int (*trigger)(snd_pcm_substream_t * substream, int cmd);
snd_pcm_uframes_t (*pointer)(snd_pcm_substream_t * substream); snd_pcm_uframes_t (*pointer)(snd_pcm_substream_t * substream);
int (*copy)(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, 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, int (*silence)(snd_pcm_substream_t *substream, int channel,
snd_pcm_uframes_t pos, snd_pcm_uframes_t count); snd_pcm_uframes_t pos, snd_pcm_uframes_t count);
struct page *(*page)(snd_pcm_substream_t *substream, unsigned long offset); 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); ...@@ -479,7 +479,7 @@ int snd_pcm_notify(snd_pcm_notify_t *notify, int nfree);
extern rwlock_t snd_pcm_link_rwlock; 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(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_status(snd_pcm_substream_t * substream, snd_pcm_status_t *status);
int snd_pcm_prepare(snd_pcm_substream_t *substream); int snd_pcm_prepare(snd_pcm_substream_t *substream);
int snd_pcm_start(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); ...@@ -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_tick_elapsed(snd_pcm_substream_t *substream);
void snd_pcm_period_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, 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, 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, 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, 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); int snd_pcm_limit_hw_rates(snd_pcm_runtime_t *runtime);
......
...@@ -79,9 +79,9 @@ struct snd_seq_kinstr_ops { ...@@ -79,9 +79,9 @@ struct snd_seq_kinstr_ops {
char *instr_type; char *instr_type;
int (*info)(void *private_data, char *info_data, long len); int (*info)(void *private_data, char *info_data, long len);
int (*put)(void *private_data, snd_seq_kinstr_t *kinstr, 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, 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 (*get_size)(void *private_data, snd_seq_kinstr_t *kinstr, long *size);
int (*remove)(void *private_data, snd_seq_kinstr_t *kinstr, int atomic); int (*remove)(void *private_data, snd_seq_kinstr_t *kinstr, int atomic);
void (*notify)(void *private_data, snd_seq_kinstr_t *kinstr, int what); void (*notify)(void *private_data, snd_seq_kinstr_t *kinstr, int what);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment