[PATCH 04/14] ALSA: control: Drop __force casts

Takashi Iwai <[email protected]>
Newsgroups gmane.linux.sound
Message-ID <[email protected]>
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.

Signed-off-by: Takashi Iwai <[email protected]>
---
 sound/core/control_compat.c | 12 ++++++------
 1 file 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;
 	}
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.