Skip to content

Commit d019403

Browse files
Tzung-Bi Shihbroonie
authored andcommitted
ASoC: rt1015: remove possible unused variable `bclk_ms'
bclk_ms is possible unused by using the given config (see [1]). sound/soc/codecs/rt1015.c:724:2: warning: Value stored to 'bclk_ms' is never read [clang-analyzer-deadcode.DeadStores] bclk_ms = frame_size > 32; ^ ~~~~~~~~~~~~~~~ In addition, bclk_ms is meaningless and confusing after applying commit a5db2ca ("ASoC: rt1015: remove unneeded variables in rt1015_priv"). The "> 32" in the expression looks like a typo but it was not. Let's remove the confusing variable bclk_ms. [1]: https://lkml.org/lkml/2021/8/23/305 Reported-by: kernel test robot <[email protected]> Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a5ec377 commit d019403

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

sound/soc/codecs/rt1015.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ static int rt1015_hw_params(struct snd_pcm_substream *substream,
689689
{
690690
struct snd_soc_component *component = dai->component;
691691
struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component);
692-
int pre_div, bclk_ms, frame_size, lrck;
692+
int pre_div, frame_size, lrck;
693693
unsigned int val_len = 0;
694694

695695
lrck = params_rate(params);
@@ -706,10 +706,7 @@ static int rt1015_hw_params(struct snd_pcm_substream *substream,
706706
return -EINVAL;
707707
}
708708

709-
bclk_ms = frame_size > 32;
710-
711-
dev_dbg(component->dev, "bclk_ms is %d and pre_div is %d for iis %d\n",
712-
bclk_ms, pre_div, dai->id);
709+
dev_dbg(component->dev, "pre_div is %d for iis %d\n", pre_div, dai->id);
713710

714711
dev_dbg(component->dev, "lrck is %dHz and pre_div is %d for iis %d\n",
715712
lrck, pre_div, dai->id);

0 commit comments

Comments
 (0)