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

Now that the bitwise parameter definitions are gone for PCM and
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/hda/common/codec.c | 2 +-
 sound/hda/core/device.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/hda/common/codec.c b/sound/hda/common/codec.c
index 641083c2376f..7d17d773cfbf 100644
--- a/sound/hda/common/codec.c
+++ b/sound/hda/common/codec.c
@@ -3379,7 +3379,7 @@ int snd_hda_add_new_ctls(struct hda_codec *codec,
 	for (; knew->name; knew++) {
 		struct snd_kcontrol *kctl;
 		int addr = 0, idx = 0;
-		if (knew->iface == (__force snd_ctl_elem_iface_t)-1)
+		if (knew->iface == -1)
 			continue; /* skip this codec private value */
 		for (;;) {
 			kctl = snd_ctl_new1(knew, codec);
diff --git a/sound/hda/core/device.c b/sound/hda/core/device.c
index 160c8d0453b0..832494035f0a 100644
--- a/sound/hda/core/device.c
+++ b/sound/hda/core/device.c
@@ -765,7 +765,7 @@ unsigned int snd_hdac_stream_format_bits(snd_pcm_format_t format, snd_pcm_subfor
 
 	params_set_format(&params, snd_hdac_format_normalize(format));
 	snd_mask_set(hw_param_mask(&params, SNDRV_PCM_HW_PARAM_SUBFORMAT),
-		     (__force unsigned int)subformat);
+		     subformat);
 
 	bits = snd_pcm_hw_params_bits(&params);
 	if (maxbits)
-- 
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 ` [PATCH 04/14] ALSA: control: Drop __force casts Takashi Iwai
2026-08-12  6:04 ` [PATCH 05/14] ALSA: oss: " 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 ` Takashi Iwai [this message]
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-9-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.