diff options
| author | Takashi Iwai <tiwai@suse.de> | 2026-08-12 08:04:36 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-08-13 16:43:27 +0200 |
| commit | cfea0fbbdb28566be414c1db2496d807ef5daa74 (patch) | |
| tree | 0c2d49ef9a969d2dbd5e072473f10aed49753d26 | |
| parent | de8131f2f1ba763b68ded06c3b4a63fb70d5dd81 (diff) | |
ALSA: control: Drop __force casts
Now that the bitwise parameter definitions are gone for control
parameters, we don't have to cast with ugly __force prefix.
Simply drop those superfluous casts.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260812060557.80445-5-tiwai@suse.de
| -rw-r--r-- | sound/core/control_compat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c index f14d9f5e94be..87f7ad5ab739 100644 --- a/sound/core/control_compat.c +++ b/sound/core/control_compat.c @@ -226,8 +226,8 @@ static int copy_ctl_value_from_user(struct snd_card *card, if (type < 0) return type; - if (type == (__force int)SNDRV_CTL_ELEM_TYPE_BOOLEAN || - type == (__force int)SNDRV_CTL_ELEM_TYPE_INTEGER) { + if (type == SNDRV_CTL_ELEM_TYPE_BOOLEAN || + type == SNDRV_CTL_ELEM_TYPE_INTEGER) { for (i = 0; i < count; i++) { s32 __user *intp = valuep; int val; @@ -236,7 +236,7 @@ static int copy_ctl_value_from_user(struct snd_card *card, data->value.integer.value[i] = val; } } else { - size = get_elem_size((__force snd_ctl_elem_type_t)type, count); + size = get_elem_size(type, count); if (size < 0) { dev_err(card->dev, "snd_ioctl32_ctl_elem_value: unknown type %d\n", type); return -EINVAL; @@ -259,8 +259,8 @@ static int copy_ctl_value_to_user(void __user *userdata, struct snd_ctl_elem_value32 __user *data32 = userdata; int i, size; - if (type == (__force int)SNDRV_CTL_ELEM_TYPE_BOOLEAN || - type == (__force int)SNDRV_CTL_ELEM_TYPE_INTEGER) { + if (type == SNDRV_CTL_ELEM_TYPE_BOOLEAN || + type == SNDRV_CTL_ELEM_TYPE_INTEGER) { for (i = 0; i < count; i++) { s32 __user *intp = valuep; int val; @@ -269,7 +269,7 @@ static int copy_ctl_value_to_user(void __user *userdata, return -EFAULT; } } else { - size = get_elem_size((__force snd_ctl_elem_type_t)type, count); + size = get_elem_size(type, count); if (copy_to_user(valuep, data->value.bytes.data, size)) return -EFAULT; } |
