diff mbox series

ASoC: rt722-sdca: Remove redundant sdca mask

Message ID 20230621080750.13511-1-jack.yu@realtek.com (mailing list archive)
State Accepted
Commit 209fb30ee1c7edc6807ac94f98c9ce78b4891aed
Headers show
Series ASoC: rt722-sdca: Remove redundant sdca mask | expand

Commit Message

Jack Yu June 21, 2023, 8:07 a.m. UTC
Remove redundant sdca mask for clear code.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
---
 sound/soc/codecs/rt722-sdca-sdw.c | 2 +-
 sound/soc/codecs/rt722-sdca.c     | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Mark Brown June 21, 2023, 12:40 p.m. UTC | #1
On Wed, Jun 21, 2023 at 04:07:50PM +0800, Jack Yu wrote:

> Remove redundant sdca mask for clear code.

>  			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?
Jack Yu June 26, 2023, 1:53 a.m. UTC | #2
> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Wednesday, June 21, 2023 8:41 PM
> To: Jack Yu <jack.yu@realtek.com>
> Cc: lgirdwood@gmail.com; alsa-devel@alsa-project.org; lars@metafoo.de;
> Flove(HsinFu) <flove@realtek.com>; Oder Chiou <oder_chiou@realtek.com>;
> Shuming [范書銘] <shumingf@realtek.com>; Derek [方德義]
> <derek.fang@realtek.com>
> Subject: Re: [PATCH] ASoC: rt722-sdca: Remove redundant sdca mask
> 
> On Wed, Jun 21, 2023 at 04:07:50PM +0800, Jack Yu wrote:
> 
> > Remove redundant sdca mask for clear code.
> 
> >  			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?

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

> 
> ------Please consider the environment before printing this e-mail.
Mark Brown July 12, 2023, 11:46 a.m. UTC | #3
On Wed, 21 Jun 2023 16:07:50 +0800, Jack Yu wrote:
> 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
diff mbox series

Patch

diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c
index cc57e4e27805..a9416bd163e8 100644
--- a/sound/soc/codecs/rt722-sdca-sdw.c
+++ b/sound/soc/codecs/rt722-sdca-sdw.c
@@ -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);
 		}
diff --git a/sound/soc/codecs/rt722-sdca.c b/sound/soc/codecs/rt722-sdca.c
index 9c0d34366c9e..0e1c65a20392 100644
--- a/sound/soc/codecs/rt722-sdca.c
+++ b/sound/soc/codecs/rt722-sdca.c
@@ -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;