All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] ALSA: es18xx: Remove the unneeded result variable
@ 2022-09-20  6:46 ` cgel.zte
  0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2022-09-20  6:46 UTC (permalink / raw)
  To: tiwai; +Cc: perex, alsa-devel, linux-kernel, ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value inb() directly instead of storing it in another redundant
 variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 sound/isa/es18xx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 3fcd168480b6..0a32845b1017 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -1344,11 +1344,8 @@ ES18XX_SINGLE("GPO1 Switch", 0, ES18XX_PM, 1, 1, ES18XX_FL_PMPORT),
 
 static int snd_es18xx_config_read(struct snd_es18xx *chip, unsigned char reg)
 {
-	int data;
-
 	outb(reg, chip->ctrl_port);
-	data = inb(chip->ctrl_port + 1);
-	return data;
+	return inb(chip->ctrl_port + 1);
 }
 
 static void snd_es18xx_config_write(struct snd_es18xx *chip,
-- 
2.25.1

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

* [PATCH linux-next] ALSA: es18xx: Remove the unneeded result variable
@ 2022-09-20  6:46 ` cgel.zte
  0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2022-09-20  6:46 UTC (permalink / raw)
  To: tiwai; +Cc: ye xingchen, alsa-devel, Zeal Robot, linux-kernel

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value inb() directly instead of storing it in another redundant
 variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 sound/isa/es18xx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 3fcd168480b6..0a32845b1017 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -1344,11 +1344,8 @@ ES18XX_SINGLE("GPO1 Switch", 0, ES18XX_PM, 1, 1, ES18XX_FL_PMPORT),
 
 static int snd_es18xx_config_read(struct snd_es18xx *chip, unsigned char reg)
 {
-	int data;
-
 	outb(reg, chip->ctrl_port);
-	data = inb(chip->ctrl_port + 1);
-	return data;
+	return inb(chip->ctrl_port + 1);
 }
 
 static void snd_es18xx_config_write(struct snd_es18xx *chip,
-- 
2.25.1

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

* Re: [PATCH linux-next] ALSA: es18xx: Remove the unneeded result variable
  2022-09-20  6:46 ` cgel.zte
@ 2022-09-20 11:34   ` Takashi Iwai
  -1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-09-20 11:34 UTC (permalink / raw)
  To: cgel.zte; +Cc: tiwai, perex, alsa-devel, linux-kernel, ye xingchen, Zeal Robot

On Tue, 20 Sep 2022 08:46:05 +0200,
cgel.zte@gmail.com wrote:
> 
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value inb() directly instead of storing it in another redundant
>  variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>

Thanks, applied.


Takashi

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

* Re: [PATCH linux-next] ALSA: es18xx: Remove the unneeded result variable
@ 2022-09-20 11:34   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-09-20 11:34 UTC (permalink / raw)
  To: cgel.zte; +Cc: alsa-devel, ye xingchen, Zeal Robot, linux-kernel, tiwai

On Tue, 20 Sep 2022 08:46:05 +0200,
cgel.zte@gmail.com wrote:
> 
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value inb() directly instead of storing it in another redundant
>  variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>

Thanks, applied.


Takashi

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

end of thread, other threads:[~2022-09-20 11:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  6:46 [PATCH linux-next] ALSA: es18xx: Remove the unneeded result variable cgel.zte
2022-09-20  6:46 ` cgel.zte
2022-09-20 11:34 ` Takashi Iwai
2022-09-20 11:34   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.