summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-02-18 14:50:26 +0000
committerMark Brown <broonie@kernel.org>2019-02-18 18:23:59 +0000
commit70605450fd42060783b0072a61a30f42a74f2917 (patch)
tree02044724086528f864bd63ca3b033f835a810f75
parentb2c02c63ac254530cffe3a7dc7d4e433da1b3a67 (diff)
downloadlinux-70605450fd42060783b0072a61a30f42a74f2917.tar.bz2
ASoC: stm32: sai: remove set but not used variables 'mask, cr1'
Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/stm/stm32_sai_sub.c: In function 'stm32_sai_configure_clock': sound/soc/stm/stm32_sai_sub.c:902:11: warning: variable 'mask' set but not used [-Wunused-but-set-variable] sound/soc/stm/stm32_sai_sub.c:902:6: warning: variable 'cr1' set but not used [-Wunused-but-set-variable] It's not used any more after 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/stm/stm32_sai_sub.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index d4825700b63f..f9297228c41c 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -898,7 +898,7 @@ static int stm32_sai_configure_clock(struct snd_soc_dai *cpu_dai,
struct snd_pcm_hw_params *params)
{
struct stm32_sai_sub_data *sai = snd_soc_dai_get_drvdata(cpu_dai);
- int cr1, mask, div = 0;
+ int div = 0;
int sai_clk_rate, mclk_ratio, den;
unsigned int rate = params_rate(params);
@@ -943,10 +943,8 @@ static int stm32_sai_configure_clock(struct snd_soc_dai *cpu_dai,
} else {
if (sai->mclk_rate) {
mclk_ratio = sai->mclk_rate / rate;
- if (mclk_ratio == 512) {
- mask = SAI_XCR1_OSR;
- cr1 = SAI_XCR1_OSR;
- } else if (mclk_ratio != 256) {
+ if ((mclk_ratio != 512) &&
+ (mclk_ratio != 256)) {
dev_err(cpu_dai->dev,
"Wrong mclk ratio %d\n",
mclk_ratio);