summaryrefslogtreecommitdiffstats
path: root/sound/pci/korg1212
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-25 23:00:56 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-26 08:33:08 +0200
commit0701492c86ac0446a834da35ef4991bcf8adb6c4 (patch)
tree56c24fbad7282873be59431f3fb88cd46ab9a47b /sound/pci/korg1212
parent191bb51e72c3b2b1ed1b2bd7ac30dd9f7ccea306 (diff)
downloadlinux-0701492c86ac0446a834da35ef4991bcf8adb6c4.tar.bz2
ALSA: korg1212: Add __force annotation to cast in user-copy callbacks
The user-copy callbacks in korg1212 driver contain the explicit cast from a user pointer to a kernel pointer, but they missed __force prefix. It's mandatory for converting between them. Spotted by sparse, a warning like: sound/pci/korg1212/korg1212.c:1329:33: warning: cast removes address space of expression Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/korg1212')
-rw-r--r--sound/pci/korg1212/korg1212.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
index 4206ba44d8bb..4e189a93f475 100644
--- a/sound/pci/korg1212/korg1212.c
+++ b/sound/pci/korg1212/korg1212.c
@@ -1326,7 +1326,7 @@ static int snd_korg1212_copy_to(struct snd_pcm_substream *substream,
}
#endif
if (in_kernel)
- memcpy((void *)dst, src, size);
+ memcpy((__force void *)dst, src, size);
else if (copy_to_user(dst, src, size))
return -EFAULT;
src++;
@@ -1365,7 +1365,7 @@ static int snd_korg1212_copy_from(struct snd_pcm_substream *substream,
}
#endif
if (in_kernel)
- memcpy((void *)dst, src, size);
+ memcpy(dst, (__force void *)src, size);
else if (copy_from_user(dst, src, size))
return -EFAULT;
dst++;