From 1c445a42c48754bb5f821478517ef1b9f861217a Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Thu, 8 Dec 2016 23:01:29 +0530 Subject: ASoC: max98090: remove superflous check for 'micbias' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In max98090_probe(), code checks for micbias being out of range. The 'micbias' variable in unsigned and checked against M98090_MBVSEL_2V2 which is zero, so remove this check. sound/soc/codecs/max98090.c: In function ‘max98090_probe’: sound/soc/codecs/max98090.c:2459:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] } else if (micbias < M98090_MBVSEL_2V2 || micbias > M98090_MBVSEL_2V8) { Signed-off-by: Vinod Koul Signed-off-by: Mark Brown --- sound/soc/codecs/max98090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index 584aab83e478..66828480d484 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c @@ -2456,7 +2456,7 @@ static int max98090_probe(struct snd_soc_codec *codec) if (err) { micbias = M98090_MBVSEL_2V8; dev_info(codec->dev, "use default 2.8v micbias\n"); - } else if (micbias < M98090_MBVSEL_2V2 || micbias > M98090_MBVSEL_2V8) { + } else if (micbias > M98090_MBVSEL_2V8) { dev_err(codec->dev, "micbias out of range 0x%x\n", micbias); micbias = M98090_MBVSEL_2V8; } -- cgit v1.2.3-59-g8ed1b From bfe48dffc80e530d5e61efcbf03637493c5ffc0e Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Thu, 8 Dec 2016 23:01:34 +0530 Subject: ASoC: img: remove unused ‘format’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In img_prl_out_hw_params(), 'format' is initialized but never used. So remove it. sound/soc/img/img-parallel-out.c: In function ‘img_prl_out_hw_params’: sound/soc/img/img-parallel-out.c:126:19: warning: variable ‘format’ set but not used [-Wunused-but-set-variable] snd_pcm_format_t format; Cc: Damien.Horsley Signed-off-by: Vinod Koul Signed-off-by: Mark Brown --- sound/soc/img/img-parallel-out.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/img/img-parallel-out.c b/sound/soc/img/img-parallel-out.c index c1610a054d65..33ceb207ee70 100644 --- a/sound/soc/img/img-parallel-out.c +++ b/sound/soc/img/img-parallel-out.c @@ -123,10 +123,8 @@ static int img_prl_out_hw_params(struct snd_pcm_substream *substream, struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai); unsigned int rate, channels; u32 reg, control_set = 0; - snd_pcm_format_t format; rate = params_rate(params); - format = params_format(params); channels = params_channels(params); switch (params_format(params)) { -- cgit v1.2.3-59-g8ed1b