linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sound: pci: emu10k1: Remove unneeded variable "change"
@ 2019-07-11 17:17 Hariprasad Kelam
       [not found] ` <d92d60c5-2a59-0d1f-05fa-a8ab13f6bdd0@linux.intel.com>
  2019-07-15  6:57 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Hariprasad Kelam @ 2019-07-11 17:17 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Allison Randal, Richard Fontana,
	Greg Kroah-Hartman, Thomas Gleixner, Hariprasad Kelam,
	alsa-devel, linux-kernel

fix below issue reported by coccicheck
sound/pci/emu10k1/emu10k1x.c:1077:5-11: Unneeded variable: "change".
Return "0" on line 1092

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 sound/pci/emu10k1/emu10k1x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index 67d6473..9cf8183 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -1074,7 +1074,6 @@ static int snd_emu10k1x_shared_spdif_put(struct snd_kcontrol *kcontrol,
 {
 	struct emu10k1x *emu = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
-	int change = 0;
 
 	val = ucontrol->value.integer.value[0] ;
 
@@ -1089,7 +1088,7 @@ static int snd_emu10k1x_shared_spdif_put(struct snd_kcontrol *kcontrol,
 		snd_emu10k1x_ptr_write(emu, ROUTING, 0, 0x1003F);
 		snd_emu10k1x_gpio_write(emu, 0x1080);
 	}
-	return change;
+	return 0;
 }
 
 static const struct snd_kcontrol_new snd_emu10k1x_shared_spdif =
-- 
2.7.4


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

* Re: [alsa-devel] [PATCH] sound: pci: emu10k1: Remove unneeded variable "change"
       [not found] ` <d92d60c5-2a59-0d1f-05fa-a8ab13f6bdd0@linux.intel.com>
@ 2019-07-13 17:44   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2019-07-13 17:44 UTC (permalink / raw)
  To:  Wasko, Michal 
  Cc: alsa-devel, Hariprasad Kelam, Thomas Gleixner,
	Greg Kroah-Hartman, Allison Randal, Jaroslav Kysela,
	Richard Fontana, linux-kernel

On Fri, 12 Jul 2019 10:06:23 +0200,
 Wasko, Michal  wrote:
> 
> 
> On 7/11/2019 7:17 PM, Hariprasad Kelam wrote:
> 
>     fix below issue reported by coccicheck
>     sound/pci/emu10k1/emu10k1x.c:1077:5-11: Unneeded variable: "change".
>     Return "0" on line 1092
>     
>     Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
>     
> Since the  function always return 0 and you perform code clean-up then
> maybe it would be a good idea to just change function to void instead
> of returning int value which does not seem to have use.

No, it's a callback function.


Takashi

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

* Re: [PATCH] sound: pci: emu10k1: Remove unneeded variable "change"
  2019-07-11 17:17 [PATCH] sound: pci: emu10k1: Remove unneeded variable "change" Hariprasad Kelam
       [not found] ` <d92d60c5-2a59-0d1f-05fa-a8ab13f6bdd0@linux.intel.com>
@ 2019-07-15  6:57 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2019-07-15  6:57 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: alsa-devel, Thomas Gleixner, Greg Kroah-Hartman, Allison Randal,
	Jaroslav Kysela, Richard Fontana, Takashi Iwai, linux-kernel

On Thu, 11 Jul 2019 19:17:26 +0200,
Hariprasad Kelam wrote:
> 
> fix below issue reported by coccicheck
> sound/pci/emu10k1/emu10k1x.c:1077:5-11: Unneeded variable: "change".
> Return "0" on line 1092
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>

Applied, thanks.


Takashi

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

end of thread, other threads:[~2019-07-15  6:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 17:17 [PATCH] sound: pci: emu10k1: Remove unneeded variable "change" Hariprasad Kelam
     [not found] ` <d92d60c5-2a59-0d1f-05fa-a8ab13f6bdd0@linux.intel.com>
2019-07-13 17:44   ` [alsa-devel] " Takashi Iwai
2019-07-15  6:57 ` Takashi Iwai

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).