Skip to contentSkip to conversation

ASoC: rt722-sdca: Remove redundant sdca mask

PATCH In review Jack Yu 2 participants 4 messages Jun 21, 2023 – Jul 12, 2023

Subsystems (3)
lore
Share & tools
lore

Jack Yu

author
#0 lore raw

PATCH 1/1 ASoC: rt722-sdca: Remove redundant sdca mask

Remove redundant sdca mask for clear code.

---
 sound/soc/codecs/rt722-sdca-sdw.c | 2 +-
 sound/soc/codecs/rt722-sdca.c     | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
sound/soc/codecs/rt722-sdca-sdw.c +1 -1
index cc57e4e27805..a9416bd163e8 100644
@@ -175,7 +175,7 @@ static int rt722_sdca_update_status(struct sdw_slave *slave,
 		 * This also could sync with the cache value as the rt722_sdca_jack_init set.
 		 */
 			sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK1,
-				SDW_SCP_SDCA_INTMASK_SDCA_0 | SDW_SCP_SDCA_INTMASK_SDCA_6);
+				SDW_SCP_SDCA_INTMASK_SDCA_6);
 			sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK2,
 				SDW_SCP_SDCA_INTMASK_SDCA_8);
 		}
sound/soc/codecs/rt722-sdca.c +1 -2
index 9c0d34366c9e..0e1c65a20392 100644
@@ -191,8 +191,7 @@ static void rt722_sdca_jack_detect_handler(struct work_struct *work)
 		return;
 
 	/* SDW_SCP_SDCA_INT_SDCA_6 is used for jack detection */
-	if (rt722->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_6 ||
-		rt722->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_0) {
+	if (rt722->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_6) {
 		ret = rt722_sdca_headset_detect(rt722);
 		if (ret < 0)
 			return;
Signature · 1 line
2.40.1
maintainer
#1 lore raw

sound/soc/codecs/rt722-sdca-sdw.c static int rt722_sdca_update_status(struct sdw_slave *slave, · line 181

Quoted 8 lines · Jack Yu

Remove redundant sdca mask for clear code.

sound/soc/codecs/rt722-sdca-sdw.c +1 -1
 			sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK1,
-				SDW_SCP_SDCA_INTMASK_SDCA_0 | SDW_SCP_SDCA_INTMASK_SDCA_6);
+				SDW_SCP_SDCA_INTMASK_SDCA_6);
 			sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK2,
 				SDW_SCP_SDCA_INTMASK_SDCA_8);
 		}

Why is this redundant?

author
#2 lore raw
Quoted 18 lines

-----Original Message-----
From: Mark Brown <[email protected]>
Sent: Wednesday, June 21, 2023 8:41 PM
To: Jack Yu <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Flove(HsinFu) <[email protected]>; Oder Chiou <[email protected]>; Shuming [范書銘] <[email protected]>; Derek [方德義] <[email protected]>
Subject: Re: [PATCH] ASoC: rt722-sdca: Remove redundant sdca mask

Review

Quoted 4 lines · Jack Yu

Remove redundant sdca mask for clear code.

(quoted diff) +0 -1
 			sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK1,
-				SDW_SCP_SDCA_INTMASK_SDCA_0 |

SDW_SCP_SDCA_INTMASK_SDCA_6);

Quoted 6 lines

sound/soc/codecs/rt722-sdca-sdw.c static int rt722_sdca_update_status(struct sdw_slave *slave, · line 181

Quoted 4 lines
sound/soc/codecs/rt722-sdca-sdw.c +1 -0
+				SDW_SCP_SDCA_INTMASK_SDCA_6);
 			sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK2,
 				SDW_SCP_SDCA_INTMASK_SDCA_8);
 		}

Why is this redundant?

Based on internal register settings, this bit won't be used in any use case, so I remove it for clear code.

Quoted 2 lines

------Please consider the environment before printing this e-mail.

maintainer
#3 lore raw
In reply to Jack Yu
Quoted 3 lines · Jack Yu

Remove redundant sdca mask for clear code.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: rt722-sdca: Remove redundant sdca mask

      commit: 209fb30ee1c7edc6807ac94f98c9ce78b4891aed

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark