Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: core: remove unused variables.

Drop a few variables that are never read.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Luca Tettamanti and committed by
Takashi Iwai
78fa2c4d f2b3614c

+1 -18
+1 -2
sound/core/control.c
··· 704 704 struct snd_ctl_elem_list list; 705 705 struct snd_kcontrol *kctl; 706 706 struct snd_ctl_elem_id *dst, *id; 707 - unsigned int offset, space, first, jidx; 707 + unsigned int offset, space, jidx; 708 708 709 709 if (copy_from_user(&list, _list, sizeof(list))) 710 710 return -EFAULT; 711 711 offset = list.offset; 712 712 space = list.space; 713 - first = 0; 714 713 /* try limit maximum space */ 715 714 if (space > 16384) 716 715 return -ENOMEM;
-3
sound/core/init.c
··· 342 342 int snd_card_disconnect(struct snd_card *card) 343 343 { 344 344 struct snd_monitor_file *mfile; 345 - struct file *file; 346 345 int err; 347 346 348 347 if (!card) ··· 365 366 366 367 spin_lock(&card->files_lock); 367 368 list_for_each_entry(mfile, &card->files_list, list) { 368 - file = mfile->file; 369 - 370 369 /* it's critical part, use endless loop */ 371 370 /* we have no room to fail */ 372 371 mfile->disconnected_f_op = mfile->file->f_op;
-3
sound/core/oss/linear.c
··· 90 90 struct snd_pcm_plugin_channel *dst_channels, 91 91 snd_pcm_uframes_t frames) 92 92 { 93 - struct linear_priv *data; 94 - 95 93 if (snd_BUG_ON(!plugin || !src_channels || !dst_channels)) 96 94 return -ENXIO; 97 - data = (struct linear_priv *)plugin->extra_data; 98 95 if (frames == 0) 99 96 return 0; 100 97 #ifdef CONFIG_SND_DEBUG
-8
sound/core/pcm_native.c
··· 1527 1527 static int snd_pcm_drop(struct snd_pcm_substream *substream) 1528 1528 { 1529 1529 struct snd_pcm_runtime *runtime; 1530 - struct snd_card *card; 1531 1530 int result = 0; 1532 1531 1533 1532 if (PCM_RUNTIME_CHECK(substream)) 1534 1533 return -ENXIO; 1535 1534 runtime = substream->runtime; 1536 - card = substream->pcm->card; 1537 1535 1538 1536 if (runtime->status->state == SNDRV_PCM_STATE_OPEN || 1539 1537 runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED || ··· 2063 2065 { 2064 2066 struct snd_pcm_file *pcm_file; 2065 2067 struct snd_pcm_substream *substream; 2066 - struct snd_pcm_str *str; 2067 2068 int err; 2068 2069 2069 2070 if (rpcm_file) ··· 2079 2082 } 2080 2083 pcm_file->substream = substream; 2081 2084 if (substream->ref_count == 1) { 2082 - str = substream->pstr; 2083 2085 substream->file = pcm_file; 2084 2086 substream->pcm_release = pcm_release_private; 2085 2087 } ··· 3020 3024 static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file, 3021 3025 struct vm_area_struct *area) 3022 3026 { 3023 - struct snd_pcm_runtime *runtime; 3024 3027 long size; 3025 3028 if (!(area->vm_flags & VM_READ)) 3026 3029 return -EINVAL; 3027 - runtime = substream->runtime; 3028 3030 size = area->vm_end - area->vm_start; 3029 3031 if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status))) 3030 3032 return -EINVAL; ··· 3057 3063 static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file, 3058 3064 struct vm_area_struct *area) 3059 3065 { 3060 - struct snd_pcm_runtime *runtime; 3061 3066 long size; 3062 3067 if (!(area->vm_flags & VM_READ)) 3063 3068 return -EINVAL; 3064 - runtime = substream->runtime; 3065 3069 size = area->vm_end - area->vm_start; 3066 3070 if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control))) 3067 3071 return -EINVAL;
-2
sound/core/seq/seq_queue.c
··· 467 467 int snd_seq_queue_timer_close(int queueid) 468 468 { 469 469 struct snd_seq_queue *queue; 470 - struct snd_seq_timer *tmr; 471 470 int result = 0; 472 471 473 472 queue = queueptr(queueid); 474 473 if (queue == NULL) 475 474 return -EINVAL; 476 - tmr = queue->timer; 477 475 snd_seq_timer_close(queue); 478 476 queuefree(queue); 479 477 return result;