Skip to contentSkip to conversation

ALSA: pcm: Drop unused snd_pcm_substream.file field

PATCH In review Takashi Iwai 2 participants 2 messages Jan 23, 2019 – Jan 30, 2019 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: pcm: Drop unused snd_pcm_substream.file field

It's assigned but nowhere used. Let's remove it.

---
 include/sound/pcm.h      | 1 -
 sound/core/oss/pcm_oss.c | 1 -
 sound/core/pcm_native.c  | 4 +---
 3 files changed, 1 insertion(+), 5 deletions(-)
include/sound/pcm.h +0 -1
index 2c30c1ad1b0d..a20d3a48df00 100644
@@ -470,7 +470,6 @@ struct snd_pcm_substream {
 	struct snd_pcm_group self_group;	/* fake group for non linked substream (with substream lock inside) */
 	struct snd_pcm_group *group;		/* pointer to current group */
 	/* -- assigned files -- */
-	void *file;
 	int ref_count;
 	atomic_t mmap_count;
 	unsigned int f_flags;
sound/core/oss/pcm_oss.c +0 -1
index 467039b342b5..d5b0d7ba83c4 100644
@@ -2427,7 +2427,6 @@ static int snd_pcm_oss_open_file(struct file *file,
 		}
 
 		pcm_oss_file->streams[idx] = substream;
-		substream->file = pcm_oss_file;
 		snd_pcm_oss_init_substream(substream, &setup[idx], minor);
 	}
 	
sound/core/pcm_native.c +1 -3
index 26afb6b0889a..63640d3af9db 100644
@@ -2452,10 +2452,8 @@ static int snd_pcm_open_file(struct file *file,
 		return -ENOMEM;
 	}
 	pcm_file->substream = substream;
-	if (substream->ref_count == 1) {
-		substream->file = pcm_file;
+	if (substream->ref_count == 1)
 		substream->pcm_release = pcm_release_private;
-	}
 	file->private_data = pcm_file;
 
 	return 0;
Signature · 1 line
2.16.4
maintainer Reviewed-by on v1 1/1
#1 lore raw

Dne 23.1.2019 v 15:38 Takashi Iwai napsal(a):

Quoted 3 lines

It's assigned but nowhere used. Let's remove it.

Quoted 47 lines
---
 include/sound/pcm.h      | 1 -
 sound/core/oss/pcm_oss.c | 1 -
 sound/core/pcm_native.c  | 4 +---
 3 files changed, 1 insertion(+), 5 deletions(-)
include/sound/pcm.h +0 -1
index 2c30c1ad1b0d..a20d3a48df00 100644
@@ -470,7 +470,6 @@ struct snd_pcm_substream {
 	struct snd_pcm_group self_group;	/* fake group for non linked substream (with substream lock inside) */
 	struct snd_pcm_group *group;		/* pointer to current group */
 	/* -- assigned files -- */
-	void *file;
 	int ref_count;
 	atomic_t mmap_count;
 	unsigned int f_flags;
sound/core/oss/pcm_oss.c +0 -1
index 467039b342b5..d5b0d7ba83c4 100644
@@ -2427,7 +2427,6 @@ static int snd_pcm_oss_open_file(struct file *file,
 		}
 
 		pcm_oss_file->streams[idx] = substream;
-		substream->file = pcm_oss_file;
 		snd_pcm_oss_init_substream(substream, &setup[idx], minor);
 	}
 
sound/core/pcm_native.c +1 -3
index 26afb6b0889a..63640d3af9db 100644
@@ -2452,10 +2452,8 @@ static int snd_pcm_open_file(struct file *file,
 		return -ENOMEM;
 	}
 	pcm_file->substream = substream;
-	if (substream->ref_count == 1) {
-		substream->file = pcm_file;
+	if (substream->ref_count == 1)
 		substream->pcm_release = pcm_release_private;
-	}
 	file->private_data = pcm_file;
 
 	return 0;
Signature · 2 lines
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.