linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2,sound-next] ASoC: rockchip: i2s-tdm: Fix a useless call issue
@ 2024-11-18  4:56 Dheeraj Reddy Jonnalagadda
  2024-12-02 17:58 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Dheeraj Reddy Jonnalagadda @ 2024-11-18  4:56 UTC (permalink / raw)
  To: frattaroli.nicolas, linux-rockchip
  Cc: lgirdwood, broonie, perex, tiwai, heiko, linux-sound,
	linux-arm-kernel, linux-kernel, Dheeraj Reddy Jonnalagadda

This commit fixes a useless call issue detected by Coverity
(CID 1507978). The call to rockchip_i2s_ch_to_io is unnecessary as its
return value is never checked or used. As a result, the function
definition and call is removed.

Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
---
 sound/soc/rockchip/rockchip_i2s_tdm.c | 28 ---------------------------
 1 file changed, 28 deletions(-)

diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c
index d1f28699652f..bd0dc586e24a 100644
--- a/sound/soc/rockchip/rockchip_i2s_tdm.c
+++ b/sound/soc/rockchip/rockchip_i2s_tdm.c
@@ -514,33 +514,6 @@ static void rockchip_i2s_tdm_xfer_resume(struct snd_pcm_substream *substream,
 			   I2S_XFER_RXS_START);
 }
 
-static int rockchip_i2s_ch_to_io(unsigned int ch, bool substream_capture)
-{
-	if (substream_capture) {
-		switch (ch) {
-		case I2S_CHN_4:
-			return I2S_IO_6CH_OUT_4CH_IN;
-		case I2S_CHN_6:
-			return I2S_IO_4CH_OUT_6CH_IN;
-		case I2S_CHN_8:
-			return I2S_IO_2CH_OUT_8CH_IN;
-		default:
-			return I2S_IO_8CH_OUT_2CH_IN;
-		}
-	} else {
-		switch (ch) {
-		case I2S_CHN_4:
-			return I2S_IO_4CH_OUT_6CH_IN;
-		case I2S_CHN_6:
-			return I2S_IO_6CH_OUT_4CH_IN;
-		case I2S_CHN_8:
-			return I2S_IO_8CH_OUT_2CH_IN;
-		default:
-			return I2S_IO_2CH_OUT_8CH_IN;
-		}
-	}
-}
-
 static int rockchip_i2s_io_multiplex(struct snd_pcm_substream *substream,
 				     struct snd_soc_dai *dai)
 {
@@ -577,7 +550,6 @@ static int rockchip_i2s_io_multiplex(struct snd_pcm_substream *substream,
 			return -EINVAL;
 		}
 
-		rockchip_i2s_ch_to_io(val, true);
 	} else {
 		struct snd_pcm_str *capture_str =
 			&substream->pcm->streams[SNDRV_PCM_STREAM_CAPTURE];
-- 
2.34.1



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

* Re: [PATCHv2,sound-next] ASoC: rockchip: i2s-tdm: Fix a useless call issue
  2024-11-18  4:56 [PATCHv2,sound-next] ASoC: rockchip: i2s-tdm: Fix a useless call issue Dheeraj Reddy Jonnalagadda
@ 2024-12-02 17:58 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-12-02 17:58 UTC (permalink / raw)
  To: frattaroli.nicolas, linux-rockchip, Dheeraj Reddy Jonnalagadda
  Cc: lgirdwood, perex, tiwai, heiko, linux-sound, linux-arm-kernel,
	linux-kernel

On Mon, 18 Nov 2024 10:26:05 +0530, Dheeraj Reddy Jonnalagadda wrote:
> This commit fixes a useless call issue detected by Coverity
> (CID 1507978). The call to rockchip_i2s_ch_to_io is unnecessary as its
> return value is never checked or used. As a result, the function
> definition and call is removed.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: rockchip: i2s-tdm: Fix a useless call issue
      commit: 42c7af046aaf35c42ef864cbd96df025c48ce50f

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



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

end of thread, other threads:[~2024-12-02 17:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-18  4:56 [PATCHv2,sound-next] ASoC: rockchip: i2s-tdm: Fix a useless call issue Dheeraj Reddy Jonnalagadda
2024-12-02 17:58 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).