#include <linux/compat.h>
#include <linux/slab.h>
static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream,
s32 __user *src)
{ … }
static int snd_pcm_ioctl_rewind_compat(struct snd_pcm_substream *substream,
u32 __user *src)
{ … }
static int snd_pcm_ioctl_forward_compat(struct snd_pcm_substream *substream,
u32 __user *src)
{ … }
struct snd_pcm_hw_params32 { … };
struct snd_pcm_sw_params32 { … };
static int snd_pcm_ioctl_sw_params_compat(struct snd_pcm_substream *substream,
struct snd_pcm_sw_params32 __user *src)
{ … }
struct snd_pcm_channel_info32 { … };
static int snd_pcm_ioctl_channel_info_compat(struct snd_pcm_substream *substream,
struct snd_pcm_channel_info32 __user *src)
{ … }
#ifdef CONFIG_X86_X32_ABI
static int snd_pcm_channel_info_user(struct snd_pcm_substream *substream,
struct snd_pcm_channel_info __user *src);
#define snd_pcm_ioctl_channel_info_x32(s, p) …
#endif
struct compat_snd_pcm_status64 { … } __packed;
static int snd_pcm_status_user_compat64(struct snd_pcm_substream *substream,
struct compat_snd_pcm_status64 __user *src,
bool ext)
{ … }
static int snd_pcm_ioctl_hw_params_compat(struct snd_pcm_substream *substream,
int refine,
struct snd_pcm_hw_params32 __user *data32)
{ … }
struct snd_xferi32 { … };
static int snd_pcm_ioctl_xferi_compat(struct snd_pcm_substream *substream,
int dir, struct snd_xferi32 __user *data32)
{ … }
struct snd_xfern32 { … };
static int snd_pcm_ioctl_xfern_compat(struct snd_pcm_substream *substream,
int dir, struct snd_xfern32 __user *data32)
{ … }
#ifdef CONFIG_X86_X32_ABI
struct snd_pcm_mmap_status_x32 { … } __packed;
struct snd_pcm_mmap_control_x32 { … };
struct snd_pcm_sync_ptr_x32 { … } __packed;
static int snd_pcm_ioctl_sync_ptr_x32(struct snd_pcm_substream *substream,
struct snd_pcm_sync_ptr_x32 __user *src)
{ … }
#endif
#ifdef __BIG_ENDIAN
typedef char __pad_before_u32[4];
typedef char __pad_after_u32[0];
#else
__pad_before_u32;
__pad_after_u32;
#endif
struct __snd_pcm_mmap_control64_buggy { … };
static int snd_pcm_ioctl_sync_ptr_buggy(struct snd_pcm_substream *substream,
struct snd_pcm_sync_ptr __user *_sync_ptr)
{ … }
enum { … };
static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
{ … }