Commit 8629eea
ALSA: pcm: Convert snd_pcm_sync_ptr() to user_access_begin/user_access_end()
Now that snd_pcm_sync_ptr_get_user() and snd_pcm_sync_ptr_put_user()
are converted to user_access_begin/user_access_end(),
snd_pcm_sync_ptr_get_user() is more efficient than a raw get_user()
followed by a copy_from_user(). And because copy_{to/from}_user() are
generic functions focussed on transfer of big data blocks to/from user,
snd_pcm_sync_ptr_put_user() is also more efficient for small amont of
data.
So use snd_pcm_sync_ptr_get_user() and snd_pcm_sync_ptr_put_user() in
snd_pcm_sync_ptr() too.
snd_pcm_ioctl_sync_ptr_buggy() is left as it is because the conversion
wouldn't be straigh-forward due to the workaround it provides.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/6ce6bc4da498ea7ea2be5f279b374370b1613b13.1749883041.git.christophe.leroy@csgroup.eu1 parent c72fad7 commit 8629eea
1 file changed
Lines changed: 18 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3096 | 3096 | | |
3097 | 3097 | | |
3098 | 3098 | | |
3099 | | - | |
3100 | 3099 | | |
3101 | 3100 | | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
3102 | 3104 | | |
3103 | 3105 | | |
3104 | | - | |
3105 | | - | |
| 3106 | + | |
3106 | 3107 | | |
3107 | | - | |
3108 | | - | |
3109 | 3108 | | |
3110 | 3109 | | |
3111 | | - | |
| 3110 | + | |
3112 | 3111 | | |
3113 | 3112 | | |
3114 | 3113 | | |
3115 | 3114 | | |
3116 | 3115 | | |
3117 | | - | |
3118 | | - | |
3119 | | - | |
| 3116 | + | |
| 3117 | + | |
3120 | 3118 | | |
3121 | 3119 | | |
3122 | 3120 | | |
3123 | | - | |
| 3121 | + | |
3124 | 3122 | | |
3125 | | - | |
3126 | | - | |
| 3123 | + | |
| 3124 | + | |
3127 | 3125 | | |
3128 | | - | |
3129 | | - | |
3130 | | - | |
3131 | | - | |
3132 | | - | |
3133 | | - | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
3134 | 3132 | | |
3135 | | - | |
| 3133 | + | |
3136 | 3134 | | |
3137 | | - | |
| 3135 | + | |
3138 | 3136 | | |
3139 | 3137 | | |
3140 | 3138 | | |
| |||
0 commit comments