public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/9] ASoC: codecs: lpass-wsa-macro: remove unnecessary bounds check
@ 2025-11-17  5:15 Jonathan Marek
  2025-11-17  5:15 ` [PATCH 2/9] ASoC: codecs: lpass-wsa-macro: remove useless gain read/write sequence Jonathan Marek
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Jonathan Marek @ 2025-11-17  5:15 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, open list:QCOM AUDIO (ASoC) DRIVERS, open list

WSA_MACRO_RX0 is 0 and WSA_MACRO_RX_MIX1 is (WSA_MACRO_RX_MAX-1), which
means it is not possible for the bounds check to fail.

Removing the WSA_MACRO_RX_MIX1 limit is needed to add support for other
ports (RX4, RX5, etc.), in which case the valid range depends on the HW
version: rely on the driver only setting valid ports in active_ch_mask
instead (already the case).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
---
 sound/soc/codecs/lpass-wsa-macro.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c
index 38faa9074ca3e..6e54c1beac8f9 100644
--- a/sound/soc/codecs/lpass-wsa-macro.c
+++ b/sound/soc/codecs/lpass-wsa-macro.c
@@ -1168,12 +1168,6 @@ static int wsa_macro_set_prim_interpolator_rate(struct snd_soc_dai *dai,
 
 	for_each_set_bit(port, &wsa->active_ch_mask[dai->id], WSA_MACRO_RX_MAX) {
 		int_1_mix1_inp = port;
-		if ((int_1_mix1_inp < WSA_MACRO_RX0) || (int_1_mix1_inp > WSA_MACRO_RX_MIX1)) {
-			dev_err(component->dev,	"%s: Invalid RX port, Dai ID is %d\n",
-				__func__, dai->id);
-			return -EINVAL;
-		}
-
 		int_mux_cfg0 = CDC_WSA_RX_INP_MUX_RX_INT0_CFG0;
 
 		/*
@@ -1220,11 +1214,6 @@ static int wsa_macro_set_mix_interpolator_rate(struct snd_soc_dai *dai,
 
 	for_each_set_bit(port, &wsa->active_ch_mask[dai->id], WSA_MACRO_RX_MAX) {
 		int_2_inp = port;
-		if ((int_2_inp < WSA_MACRO_RX0) || (int_2_inp > WSA_MACRO_RX_MIX1)) {
-			dev_err(component->dev,	"%s: Invalid RX port, Dai ID is %d\n",
-				__func__, dai->id);
-			return -EINVAL;
-		}
 
 		int_mux_cfg1 = CDC_WSA_RX_INP_MUX_RX_INT0_CFG1;
 		for (j = 0; j < NUM_INTERPOLATORS; j++) {
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-11-20  9:40 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17  5:15 [PATCH 1/9] ASoC: codecs: lpass-wsa-macro: remove unnecessary bounds check Jonathan Marek
2025-11-17  5:15 ` [PATCH 2/9] ASoC: codecs: lpass-wsa-macro: remove useless gain read/write sequence Jonathan Marek
2025-11-19 15:36   ` Srinivas Kandagatla
2025-11-19 15:36   ` Srinivas Kandagatla
2025-11-17  5:15 ` [PATCH 3/9] ASoC: codecs: lpass-wsa-macro: remove mix path event Jonathan Marek
2025-11-19 15:34   ` Srinivas Kandagatla
2025-11-17  5:15 ` [PATCH 4/9] ASoC: codecs: lpass-wsa-macro: fix path clock dependencies Jonathan Marek
2025-11-19 15:34   ` Srinivas Kandagatla
2025-11-17  5:15 ` [PATCH 5/9] ASoC: codecs: lpass-wsa-macro: add volume controls for mix path Jonathan Marek
2025-11-19 15:34   ` Srinivas Kandagatla
2025-11-17  5:15 ` [PATCH 6/9] ASoC: codecs: lpass-wsa-macro: remove main path event Jonathan Marek
2025-11-19 15:34   ` Srinivas Kandagatla
2025-11-17  5:15 ` [PATCH 7/9] ASoC: codecs: lpass-wsa-macro: add RX4 and RX5 Jonathan Marek
2025-11-19 15:33   ` Srinivas Kandagatla
2025-11-19 17:13     ` Jonathan Marek
2025-11-17  5:15 ` [PATCH 8/9] ASoC: codecs: lpass-wsa-macro: remove unused WSA_MACRO_RX_MIX enum Jonathan Marek
2025-11-19 15:33   ` Srinivas Kandagatla
2025-11-17  5:15 ` [PATCH 9/9] ASoC: codecs: lpass-rx-macro: fix mute_stream affecting all paths Jonathan Marek
2025-11-19 15:33   ` Srinivas Kandagatla
2025-11-19 15:35 ` [PATCH 1/9] ASoC: codecs: lpass-wsa-macro: remove unnecessary bounds check Srinivas Kandagatla
2025-11-20  9:40 ` (subset) " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox