linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg
@ 2019-07-09 18:25 Hariprasad Kelam
  2019-07-10  5:24 ` Tzung-Bi Shih
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hariprasad Kelam @ 2019-07-09 18:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Matthias Brugger, Tzung-Bi Shih, Shunli Wang, Hariprasad Kelam,
	alsa-devel, linux-arm-kernel, linux-mediatek, linux-kernel

As mt6358_codec_init_reg function always returns 0 , change return type
from int to void.

fixes below issue reported by coccicheck
sound/soc/codecs/mt6358.c:2260:5-8: Unneeded variable: "ret". Return "0"
on line 2289

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 sound/soc/codecs/mt6358.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sound/soc/codecs/mt6358.c b/sound/soc/codecs/mt6358.c
index 50b3fc5..c17250a 100644
--- a/sound/soc/codecs/mt6358.c
+++ b/sound/soc/codecs/mt6358.c
@@ -2255,10 +2255,8 @@ static struct snd_soc_dai_driver mt6358_dai_driver[] = {
 	},
 };
 
-static int mt6358_codec_init_reg(struct mt6358_priv *priv)
+static void mt6358_codec_init_reg(struct mt6358_priv *priv)
 {
-	int ret = 0;
-
 	/* Disable HeadphoneL/HeadphoneR short circuit protection */
 	regmap_update_bits(priv->regmap, MT6358_AUDDEC_ANA_CON0,
 			   RG_AUDHPLSCDISABLE_VAUDP15_MASK_SFT,
@@ -2285,8 +2283,6 @@ static int mt6358_codec_init_reg(struct mt6358_priv *priv)
 	/* set gpio */
 	playback_gpio_reset(priv);
 	capture_gpio_reset(priv);
-
-	return ret;
 }
 
 static int mt6358_codec_probe(struct snd_soc_component *cmpnt)
-- 
2.7.4


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

* Re: [PATCH] sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg
  2019-07-09 18:25 [PATCH] sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg Hariprasad Kelam
@ 2019-07-10  5:24 ` Tzung-Bi Shih
  2019-07-12 10:56 ` Mark Brown
  2019-07-22 12:22 ` Applied "sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg" to the asoc tree Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Tzung-Bi Shih @ 2019-07-10  5:24 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Matthias Brugger, Shunli Wang, ALSA development,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Wed, Jul 10, 2019 at 2:25 AM Hariprasad Kelam
<hariprasad.kelam@gmail.com> wrote:
>
> As mt6358_codec_init_reg function always returns 0 , change return type
> from int to void.
>
> fixes below issue reported by coccicheck
> sound/soc/codecs/mt6358.c:2260:5-8: Unneeded variable: "ret". Return "0"
> on line 2289
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Acked-by: Tzung-Bi Shih <tzungbi@google.com>

Thanks for cleaning this up.

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

* Re: [PATCH] sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg
  2019-07-09 18:25 [PATCH] sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg Hariprasad Kelam
  2019-07-10  5:24 ` Tzung-Bi Shih
@ 2019-07-12 10:56 ` Mark Brown
  2019-07-22 12:22 ` Applied "sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg" to the asoc tree Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2019-07-12 10:56 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Matthias Brugger,
	Tzung-Bi Shih, Shunli Wang, alsa-devel, linux-arm-kernel,
	linux-mediatek, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

On Tue, Jul 09, 2019 at 11:55:43PM +0530, Hariprasad Kelam wrote:
> As mt6358_codec_init_reg function always returns 0 , change return type
> from int to void.

Please use subject lines matching the style for the subsystem.  This
makes it easier for people to identify relevant patches.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Applied "sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg" to the asoc tree
  2019-07-09 18:25 [PATCH] sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg Hariprasad Kelam
  2019-07-10  5:24 ` Tzung-Bi Shih
  2019-07-12 10:56 ` Mark Brown
@ 2019-07-22 12:22 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2019-07-22 12:22 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: alsa-devel, Jaroslav Kysela, Liam Girdwood, linux-arm-kernel,
	linux-kernel, linux-mediatek, Mark Brown, Matthias Brugger,
	Shunli Wang, Takashi Iwai, Tzung-Bi Shih

The patch

   sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg

has been applied to the asoc tree at

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

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

From 1d3dd532883be6167da5df6117efd6d4e8790456 Mon Sep 17 00:00:00 2001
From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Date: Tue, 9 Jul 2019 23:55:43 +0530
Subject: [PATCH] sound: soc: codecs: mt6358: change return type of
 mt6358_codec_init_reg

As mt6358_codec_init_reg function always returns 0 , change return type
from int to void.

fixes below issue reported by coccicheck
sound/soc/codecs/mt6358.c:2260:5-8: Unneeded variable: "ret". Return "0"
on line 2289

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Acked-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190709182543.GA6611@hari-Inspiron-1545
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/mt6358.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sound/soc/codecs/mt6358.c b/sound/soc/codecs/mt6358.c
index 50b3fc5457ea..c17250aab2d0 100644
--- a/sound/soc/codecs/mt6358.c
+++ b/sound/soc/codecs/mt6358.c
@@ -2255,10 +2255,8 @@ static struct snd_soc_dai_driver mt6358_dai_driver[] = {
 	},
 };
 
-static int mt6358_codec_init_reg(struct mt6358_priv *priv)
+static void mt6358_codec_init_reg(struct mt6358_priv *priv)
 {
-	int ret = 0;
-
 	/* Disable HeadphoneL/HeadphoneR short circuit protection */
 	regmap_update_bits(priv->regmap, MT6358_AUDDEC_ANA_CON0,
 			   RG_AUDHPLSCDISABLE_VAUDP15_MASK_SFT,
@@ -2285,8 +2283,6 @@ static int mt6358_codec_init_reg(struct mt6358_priv *priv)
 	/* set gpio */
 	playback_gpio_reset(priv);
 	capture_gpio_reset(priv);
-
-	return ret;
 }
 
 static int mt6358_codec_probe(struct snd_soc_component *cmpnt)
-- 
2.20.1


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

end of thread, other threads:[~2019-07-22 12:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-09 18:25 [PATCH] sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg Hariprasad Kelam
2019-07-10  5:24 ` Tzung-Bi Shih
2019-07-12 10:56 ` Mark Brown
2019-07-22 12:22 ` Applied "sound: soc: codecs: mt6358: change return type of mt6358_codec_init_reg" to the asoc tree 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).