linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index'
@ 2019-04-17 14:57 Yue Haibing
  2019-04-17 18:19 ` Geoff Levand
  0 siblings, 1 reply; 3+ messages in thread
From: Yue Haibing @ 2019-04-17 14:57 UTC (permalink / raw)
  To: geoff, perex, tiwai, benh, paulus, mpe
  Cc: linux-kernel, linuxppc-dev, alsa-devel, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

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

sound/ppc/snd_ps3.c: In function 'snd_ps3_program_dma':
sound/ppc/snd_ps3.c:236:8: warning: variable 'start_vaddr' set but not used [-Wunused-but-set-variable]
sound/ppc/snd_ps3.c: In function 'snd_ps3_pcm_open':
sound/ppc/snd_ps3.c:529:6: warning: variable 'pcm_index' set but not used [-Wunused-but-set-variable]

They are never used and can be removed.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 sound/ppc/snd_ps3.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
index 521236e..f77a0d5 100644
--- a/sound/ppc/snd_ps3.c
+++ b/sound/ppc/snd_ps3.c
@@ -233,7 +233,6 @@ static int snd_ps3_program_dma(struct snd_ps3_card_info *card,
 	int fill_stages, dma_ch, stage;
 	enum snd_ps3_ch ch;
 	uint32_t ch0_kick_event = 0; /* initialize to mute gcc */
-	void *start_vaddr;
 	unsigned long irqsave;
 	int silent = 0;
 
@@ -257,7 +256,6 @@ static int snd_ps3_program_dma(struct snd_ps3_card_info *card,
 	fill_stages = 4;
 	spin_lock_irqsave(&card->dma_lock, irqsave);
 	for (ch = 0; ch < 2; ch++) {
-		start_vaddr = card->dma_next_transfer_vaddr[0];
 		for (stage = 0; stage < fill_stages; stage++) {
 			dma_ch = stage * 2 + ch;
 			if (silent)
@@ -526,9 +524,7 @@ static int snd_ps3_pcm_open(struct snd_pcm_substream *substream)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream);
-	int pcm_index;
 
-	pcm_index = substream->pcm->device;
 	/* to retrieve substream/runtime in interrupt handler */
 	card->substream = substream;
 
-- 
2.7.4



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

* Re: [PATCH -next] ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index'
  2019-04-17 14:57 [PATCH -next] ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index' Yue Haibing
@ 2019-04-17 18:19 ` Geoff Levand
  2019-04-17 19:18   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Geoff Levand @ 2019-04-17 18:19 UTC (permalink / raw)
  To: Yue Haibing, perex, tiwai, benh, paulus, mpe
  Cc: linux-kernel, linuxppc-dev, alsa-devel

On 4/17/19 7:57 AM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
> 
> Fixes gcc '-Wunused-but-set-variable' warnings:
> 
> sound/ppc/snd_ps3.c: In function 'snd_ps3_program_dma':
> sound/ppc/snd_ps3.c:236:8: warning: variable 'start_vaddr' set but not used [-Wunused-but-set-variable]
> sound/ppc/snd_ps3.c: In function 'snd_ps3_pcm_open':
> sound/ppc/snd_ps3.c:529:6: warning: variable 'pcm_index' set but not used [-Wunused-but-set-variable]
> 
> They are never used and can be removed.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  sound/ppc/snd_ps3.c | 4 ----
>  1 file changed, 4 deletions(-)

Seems OK.  Thanks for submitting.

Acked-by: Geoff Levand <geoff@infradead.org>

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

* Re: [PATCH -next] ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index'
  2019-04-17 18:19 ` Geoff Levand
@ 2019-04-17 19:18   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2019-04-17 19:18 UTC (permalink / raw)
  To: Geoff Levand
  Cc: mpe, Yue Haibing, benh, perex, paulus, alsa-devel, linuxppc-dev,
	linux-kernel

On Wed, 17 Apr 2019 20:19:30 +0200,
Geoff Levand wrote:
> 
> On 4/17/19 7:57 AM, Yue Haibing wrote:
> > From: YueHaibing <yuehaibing@huawei.com>
> > 
> > Fixes gcc '-Wunused-but-set-variable' warnings:
> > 
> > sound/ppc/snd_ps3.c: In function 'snd_ps3_program_dma':
> > sound/ppc/snd_ps3.c:236:8: warning: variable 'start_vaddr' set but not used [-Wunused-but-set-variable]
> > sound/ppc/snd_ps3.c: In function 'snd_ps3_pcm_open':
> > sound/ppc/snd_ps3.c:529:6: warning: variable 'pcm_index' set but not used [-Wunused-but-set-variable]
> > 
> > They are never used and can be removed.
> > 
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> >  sound/ppc/snd_ps3.c | 4 ----
> >  1 file changed, 4 deletions(-)
> 
> Seems OK.  Thanks for submitting.
> 
> Acked-by: Geoff Levand <geoff@infradead.org>

Applied now.  Thanks.


Takashi

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

end of thread, other threads:[~2019-04-17 19:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17 14:57 [PATCH -next] ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index' Yue Haibing
2019-04-17 18:19 ` Geoff Levand
2019-04-17 19:18   ` 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).