ASoC: Intel: skl_nau88l25_max98357a: rename shadowed variable
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 13 Jan 2020 21:04:23 +0000 (15:04 -0600)
committerMark Brown <broonie@kernel.org>
Tue, 14 Jan 2020 15:30:01 +0000 (15:30 +0000)
Fix cppcheck warning:

[sound/soc/intel/boards/skl_nau88l25_max98357a.c:257] ->
[sound/soc/intel/boards/skl_nau88l25_max98357a.c:142]: (style) Local
variable 'channels' shadows outer variable

[sound/soc/intel/boards/skl_nau88l25_max98357a.c:257] ->
[sound/soc/intel/boards/skl_nau88l25_max98357a.c:318]: (style) Local
variable 'channels' shadows outer variable

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200113210428.27457-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/skl_nau88l25_max98357a.c

index 3ce8efbeed12a2ccf37090ae3d545d4c3dcd479c..e6de3b28d8406e77bfb8c74e3c7a953caf486ce4 100644 (file)
@@ -139,13 +139,13 @@ static int skylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
 {
        struct snd_interval *rate = hw_param_interval(params,
                        SNDRV_PCM_HW_PARAM_RATE);
-       struct snd_interval *channels = hw_param_interval(params,
+       struct snd_interval *chan = hw_param_interval(params,
                        SNDRV_PCM_HW_PARAM_CHANNELS);
        struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
 
        /* The ADSP will covert the FE rate to 48k, stereo */
        rate->min = rate->max = 48000;
-       channels->min = channels->max = 2;
+       chan->min = chan->max = 2;
 
        /* set SSP0 to 24 bit */
        snd_mask_none(fmt);
@@ -315,13 +315,13 @@ static const struct snd_soc_ops skylake_nau8825_ops = {
 static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
                struct snd_pcm_hw_params *params)
 {
-       struct snd_interval *channels = hw_param_interval(params,
+       struct snd_interval *chan = hw_param_interval(params,
                                SNDRV_PCM_HW_PARAM_CHANNELS);
 
        if (params_channels(params) == 2 || DMIC_CH(dmic_constraints) == 2)
-               channels->min = channels->max = 2;
+               chan->min = chan->max = 2;
        else
-               channels->min = channels->max = 4;
+               chan->min = chan->max = 4;
 
        return 0;
 }