All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: linux-sound@vger.kernel.org
Subject: [PATCH 04/14] ALSA: control: Drop __force casts
Date: Wed, 12 Aug 2026 08:04:36 +0200	[thread overview]
Message-ID: <20260812060557.80445-5-tiwai@suse.de> (raw)
In-Reply-To: <20260812060557.80445-1-tiwai@suse.de>

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 <tiwai@suse.de>
---
 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


  parent reply	other threads:[~2026-08-12  6:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  6:04 [PATCH 00/14] ALSA: Drop __bitwise and __force prefix Takashi Iwai
2026-08-12  6:04 ` [PATCH 01/14] ALSA: uapi: " Takashi Iwai
2026-08-12  6:04 ` [PATCH 02/14] ALSA: pcm: Drop __force casts Takashi Iwai
2026-08-12  6:04 ` [PATCH 03/14] ALSA: pcm: Avoid macros for SNDRV_PCM_FMTBIT and SNDRV_PCM_SUBFMTBIT Takashi Iwai
2026-08-12  6:04 ` Takashi Iwai [this message]
2026-08-12  6:04 ` [PATCH 05/14] ALSA: oss: Drop __force casts Takashi Iwai
2026-08-12  6:04 ` [PATCH 06/14] ALSA: kunit: " Takashi Iwai
2026-08-12  6:04 ` [PATCH 07/14] ALSA: aloop: " Takashi Iwai
2026-08-12  6:04 ` [PATCH 08/14] ALSA: hda: " Takashi Iwai
2026-08-12  6:04 ` [PATCH 09/14] ALSA: asihpi: Drop __force cast Takashi Iwai
2026-08-12  6:04 ` [PATCH 10/14] ALSA: emu10k1: Drop __force casts Takashi Iwai
2026-08-12  6:04 ` [PATCH 11/14] ASoC: fsl: " Takashi Iwai
2026-08-12  9:41   ` Shengjiu Wang
2026-08-12 12:49   ` Mark Brown
2026-08-12  6:04 ` [PATCH 12/14] ASoC: Intel: avs: Drop __force cast Takashi Iwai
2026-08-12  7:12   ` Cezary Rojewski
2026-08-12 14:04   ` Mark Brown
2026-08-12  6:04 ` [PATCH 13/14] ASoC: mediatek: Drop __force casts Takashi Iwai
2026-08-12 14:06   ` Mark Brown
2026-08-12  6:04 ` [PATCH 14/14] ASoC: meson: Drop __force cast Takashi Iwai
2026-08-12 14:07   ` Mark Brown
2026-08-12  7:27 ` [PATCH 00/14] ALSA: Drop __bitwise and __force prefix Cezary Rojewski
2026-08-12  7:34   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260812060557.80445-5-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-sound@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.