diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-09-23 10:25:05 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-09-23 10:29:08 +0400 |
commit | 2ca595ab7a557f6cee21bf073fe2a242004cd19e (patch) | |
tree | 8aad53a6f17f43e437235422e2735756ae97f9f9 /sound/pci/rme9652 | |
parent | 643d6bbb9637a9b4bb47ec1a1ae3adf3ff9d75a1 (diff) | |
download | linux-2ca595ab7a557f6cee21bf073fe2a242004cd19e.tar.xz |
ALSA: hdspm - cleanup __user tags in ioctl()
This makes the code cleaner and silences a Sparse complaint:
sound/pci/rme9652/hdspm.c:6341:23: warning: incorrect type in assignment (incompatible argument 4 (different address spaces))
sound/pci/rme9652/hdspm.c:6341:23: expected int ( *ioctl )( ... )
sound/pci/rme9652/hdspm.c:6341:23: got int ( static [toplevel] *<noident> )( ... )
sound/pci/rme9652/hdspm.c:6102:44: warning: dereference of noderef expression
sound/pci/rme9652/hdspm.c:6225:50: warning: dereference of noderef expression
sound/pci/rme9652/hdspm.c:6264:50: warning: dereference of noderef expression
sound/pci/rme9652/hdspm.c:6283:50: warning: dereference of noderef expression
sound/pci/rme9652/hdspm.c:6289:59: warning: dereference of noderef expression
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index bf438d121afe..6e2f7ef7ddb1 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -6097,7 +6097,7 @@ static inline int copy_u32_le(void __user *dest, void __iomem *src) } static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, - unsigned int cmd, unsigned long __user arg) + unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; struct hdspm *hdspm = hw->private_data; @@ -6222,7 +6222,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, info.line_out = hdspm_line_out(hdspm); info.passthru = 0; spin_unlock_irq(&hdspm->lock); - if (copy_to_user((void __user *) arg, &info, sizeof(info))) + if (copy_to_user(argp, &info, sizeof(info))) return -EFAULT; break; @@ -6261,7 +6261,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, break; } - if (copy_to_user((void __user *) arg, &status, sizeof(status))) + if (copy_to_user(argp, &status, sizeof(status))) return -EFAULT; @@ -6280,13 +6280,13 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, if (hdspm->tco) hdspm_version.addons |= HDSPM_ADDON_TCO; - if (copy_to_user((void __user *) arg, &hdspm_version, + if (copy_to_user(argp, &hdspm_version, sizeof(hdspm_version))) return -EFAULT; break; case SNDRV_HDSPM_IOCTL_GET_MIXER: - if (copy_from_user(&mixer, (void __user *)arg, sizeof(mixer))) + if (copy_from_user(&mixer, argp, sizeof(mixer))) return -EFAULT; if (copy_to_user((void __user *)mixer.mixer, hdspm->mixer, sizeof(struct hdspm_mixer))) |