All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ALSA: es1688: Remove set but not used variable 'hw'
@ 2019-02-14  2:10 ` YueHaibing
  0 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2019-02-14  1:56 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: YueHaibing, alsa-devel, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_probe':
sound/isa/es1688/es1688_lib.c:124:31: warning:
 variable 'hw' set but not used [-Wunused-but-set-variable]
  unsigned short major, minor, hw;
                               ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 sound/isa/es1688/es1688_lib.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
index da341969e650..1d9556c045e9 100644
--- a/sound/isa/es1688/es1688_lib.c
+++ b/sound/isa/es1688/es1688_lib.c
@@ -121,7 +121,7 @@ EXPORT_SYMBOL(snd_es1688_reset);
 static int snd_es1688_probe(struct snd_es1688 *chip)
 {
 	unsigned long flags;
-	unsigned short major, minor, hw;
+	unsigned short major, minor;
 	int i;
 
 	/*
@@ -166,14 +166,12 @@ static int snd_es1688_probe(struct snd_es1688 *chip)
 	if (!chip->version)
 		return -ENODEV;	/* probably SB */
 
-	hw = ES1688_HW_AUTO;
 	switch (chip->version & 0xfff0) {
 	case 0x4880:
 		snd_printk(KERN_ERR "[0x%lx] ESS: AudioDrive ES488 detected, "
 			   "but driver is in another place\n", chip->port);
 		return -ENODEV;
 	case 0x6880:
-		hw = (chip->version & 0x0f) >= 8 ? ES1688_HW_1688 : ES1688_HW_688;
 		break;
 	default:
 		snd_printk(KERN_ERR "[0x%lx] ESS: unknown AudioDrive chip "

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

* [PATCH -next] ALSA: es1688: Remove set but not used variable 'hw'
@ 2019-02-14  2:10 ` YueHaibing
  0 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2019-02-14  2:10 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: YueHaibing, alsa-devel, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_probe':
sound/isa/es1688/es1688_lib.c:124:31: warning:
 variable 'hw' set but not used [-Wunused-but-set-variable]
  unsigned short major, minor, hw;
                               ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 sound/isa/es1688/es1688_lib.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
index da341969e650..1d9556c045e9 100644
--- a/sound/isa/es1688/es1688_lib.c
+++ b/sound/isa/es1688/es1688_lib.c
@@ -121,7 +121,7 @@ EXPORT_SYMBOL(snd_es1688_reset);
 static int snd_es1688_probe(struct snd_es1688 *chip)
 {
 	unsigned long flags;
-	unsigned short major, minor, hw;
+	unsigned short major, minor;
 	int i;
 
 	/*
@@ -166,14 +166,12 @@ static int snd_es1688_probe(struct snd_es1688 *chip)
 	if (!chip->version)
 		return -ENODEV;	/* probably SB */
 
-	hw = ES1688_HW_AUTO;
 	switch (chip->version & 0xfff0) {
 	case 0x4880:
 		snd_printk(KERN_ERR "[0x%lx] ESS: AudioDrive ES488 detected, "
 			   "but driver is in another place\n", chip->port);
 		return -ENODEV;
 	case 0x6880:
-		hw = (chip->version & 0x0f) >= 8 ? ES1688_HW_1688 : ES1688_HW_688;
 		break;
 	default:
 		snd_printk(KERN_ERR "[0x%lx] ESS: unknown AudioDrive chip "






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

* [PATCH -next] ALSA: es1688: Remove set but not used variable 'hw'
@ 2019-02-14  2:10 ` YueHaibing
  0 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2019-02-14  2:10 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: YueHaibing, alsa-devel, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_probe':
sound/isa/es1688/es1688_lib.c:124:31: warning:
 variable 'hw' set but not used [-Wunused-but-set-variable]
  unsigned short major, minor, hw;
                               ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 sound/isa/es1688/es1688_lib.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
index da341969e650..1d9556c045e9 100644
--- a/sound/isa/es1688/es1688_lib.c
+++ b/sound/isa/es1688/es1688_lib.c
@@ -121,7 +121,7 @@ EXPORT_SYMBOL(snd_es1688_reset);
 static int snd_es1688_probe(struct snd_es1688 *chip)
 {
 	unsigned long flags;
-	unsigned short major, minor, hw;
+	unsigned short major, minor;
 	int i;
 
 	/*
@@ -166,14 +166,12 @@ static int snd_es1688_probe(struct snd_es1688 *chip)
 	if (!chip->version)
 		return -ENODEV;	/* probably SB */
 
-	hw = ES1688_HW_AUTO;
 	switch (chip->version & 0xfff0) {
 	case 0x4880:
 		snd_printk(KERN_ERR "[0x%lx] ESS: AudioDrive ES488 detected, "
 			   "but driver is in another place\n", chip->port);
 		return -ENODEV;
 	case 0x6880:
-		hw = (chip->version & 0x0f) >= 8 ? ES1688_HW_1688 : ES1688_HW_688;
 		break;
 	default:
 		snd_printk(KERN_ERR "[0x%lx] ESS: unknown AudioDrive chip "

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

* Re: [PATCH -next] ALSA: es1688: Remove set but not used variable 'hw'
  2019-02-14  2:10 ` YueHaibing
  (?)
@ 2019-02-14  7:58   ` Takashi Iwai
  -1 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2019-02-14  7:58 UTC (permalink / raw)
  To: YueHaibing; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel

On Thu, 14 Feb 2019 03:10:33 +0100,
YueHaibing wrote:
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_probe':
> sound/isa/es1688/es1688_lib.c:124:31: warning:
>  variable 'hw' set but not used [-Wunused-but-set-variable]
>   unsigned short major, minor, hw;
>                                ^
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thanks.


Takashi

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

* Re: [PATCH -next] ALSA: es1688: Remove set but not used variable 'hw'
@ 2019-02-14  7:58   ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2019-02-14  7:58 UTC (permalink / raw)
  To: YueHaibing; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel

On Thu, 14 Feb 2019 03:10:33 +0100,
YueHaibing wrote:
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_probe':
> sound/isa/es1688/es1688_lib.c:124:31: warning:
>  variable 'hw' set but not used [-Wunused-but-set-variable]
>   unsigned short major, minor, hw;
>                                ^
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thanks.


Takashi

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

* Re: [PATCH -next] ALSA: es1688: Remove set but not used variable 'hw'
@ 2019-02-14  7:58   ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2019-02-14  7:58 UTC (permalink / raw)
  To: YueHaibing; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel

On Thu, 14 Feb 2019 03:10:33 +0100,
YueHaibing wrote:
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_probe':
> sound/isa/es1688/es1688_lib.c:124:31: warning:
>  variable 'hw' set but not used [-Wunused-but-set-variable]
>   unsigned short major, minor, hw;
>                                ^
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thanks.


Takashi

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

end of thread, other threads:[~2019-02-14  7:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14  1:56 [PATCH -next] ALSA: es1688: Remove set but not used variable 'hw' YueHaibing
2019-02-14  2:10 ` YueHaibing
2019-02-14  2:10 ` YueHaibing
2019-02-14  7:58 ` Takashi Iwai
2019-02-14  7:58   ` Takashi Iwai
2019-02-14  7:58   ` 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.