Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1733872
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] ASoC: qcom: remove duplicate initializations of dma_ch and v |
| Date | 2017-09-18 11:30 +0200 |
| Message-ID | <ur0xj-4fK-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Colin Ian King <colin.king@canonical.com> dma_ch is being initialized to zero and then immediately afterwards being updated again, so the first initialization is redundant and can be remove. Likewise, the pointer v is being initialized twice, so remove the second duplicate initialization. Cleans up two clang build warnings: warning: Value stored to 'dma_ch' is never read warning: Value stored to 'v' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> --- sound/soc/qcom/lpass-platform.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index e1945e1772cd..caf71aab8196 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c @@ -74,7 +74,6 @@ static int lpass_platform_pcmops_open(struct snd_pcm_substream *substream) data->i2s_port = cpu_dai->driver->id; runtime->private_data = data; - dma_ch = 0; if (v->alloc_dma_channel) dma_ch = v->alloc_dma_channel(drvdata, dir); else @@ -122,7 +121,6 @@ static int lpass_platform_pcmops_close(struct snd_pcm_substream *substream) struct lpass_pcm_data *data; data = runtime->private_data; - v = drvdata->variant; drvdata->substream[data->dma_ch] = NULL; if (v->free_dma_channel) v->free_dma_channel(drvdata, data->dma_ch); -- 2.14.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] ASoC: qcom: remove duplicate initializations of dma_ch and v Colin King <colin.king@canonical.com> - 2017-09-18 11:30 +0200 Applied "ASoC: qcom: remove duplicate initializations of dma_ch and v" to the asoc tree Mark Brown <broonie@kernel.org> - 2017-09-19 15:50 +0200
csiph-web