diff options
author | Olof Johansson <olof@lixom.net> | 2011-11-05 17:51:54 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-11-06 05:22:15 -0500 |
commit | 447c6f93aba42e6889be55a614d4dddc25f17863 (patch) | |
tree | 1c01135b128773dba25eb4c0b187bdada20d1eb4 /sound/core | |
parent | 862a6244eb9f9f5123fe819454fcfcae0ee1f2f9 (diff) |
ALSA: control: remove compilation warning on 32-bit
This was introduced by 'ALSA: control: add support for ENUMERATED user
space controls' which adds a u64 variable that gets cast to a pointer:
sound/core/control.c: In function 'snd_ctl_elem_init_enum_names':
sound/core/control.c:1089: warning: cast to pointer from integer of different size
Cast to uintptr_t before casting to pointer to avoid the warning.
Signed-off-by: Olof Johansson <olof@lixom.net>
[cl: replace long with uintptr_t]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 978fe1a8e9f0..59edb12dd542 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -1081,12 +1081,12 @@ static int snd_ctl_elem_init_enum_names(struct user_element *ue) | |||
1081 | char *names, *p; | 1081 | char *names, *p; |
1082 | size_t buf_len, name_len; | 1082 | size_t buf_len, name_len; |
1083 | unsigned int i; | 1083 | unsigned int i; |
1084 | const uintptr_t user_ptrval = ue->info.value.enumerated.names_ptr; | ||
1084 | 1085 | ||
1085 | if (ue->info.value.enumerated.names_length > 64 * 1024) | 1086 | if (ue->info.value.enumerated.names_length > 64 * 1024) |
1086 | return -EINVAL; | 1087 | return -EINVAL; |
1087 | 1088 | ||
1088 | names = memdup_user( | 1089 | names = memdup_user((const void __user *)user_ptrval, |
1089 | (const void __user *)ue->info.value.enumerated.names_ptr, | ||
1090 | ue->info.value.enumerated.names_length); | 1090 | ue->info.value.enumerated.names_length); |
1091 | if (IS_ERR(names)) | 1091 | if (IS_ERR(names)) |
1092 | return PTR_ERR(names); | 1092 | return PTR_ERR(names); |