diff mbox series

[10/18] ASoC: Intel: kbl_rt5663_max98927: rename shadowed variable

Message ID 20200113210428.27457-11-pierre-louis.bossart@linux.intel.com
State Accepted
Commit 13a5d5edcf0607ec1584b2c05b1bf3e6600f6533
Headers show
Series [01/18] ASoC: Intel: bxt_da7219_max98357a: rename shadowed variable | expand

Commit Message

Pierre-Louis Bossart Jan. 13, 2020, 9:04 p.m. UTC
Fix cppcheck warning:

[sound/soc/intel/boards/kbl_rt5663_max98927.c:358] ->
[sound/soc/intel/boards/kbl_rt5663_max98927.c:401]: (style) Local
variable 'channels' shadows outer variable

[sound/soc/intel/boards/kbl_rt5663_max98927.c:358] ->
[sound/soc/intel/boards/kbl_rt5663_max98927.c:457]: (style) Local
variable 'channels' shadows outer variable

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/kbl_rt5663_max98927.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index cd748d6f4af3..d8f2ff7139a9 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -398,7 +398,7 @@  static int kabylake_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);
 	struct snd_soc_dpcm *dpcm = container_of(
@@ -413,7 +413,7 @@  static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
 	    !strcmp(fe_dai_link->name, "Kbl Audio Headset Playback") ||
 	    !strcmp(fe_dai_link->name, "Kbl Audio Capture Port")) {
 		rate->min = rate->max = 48000;
-		channels->min = channels->max = 2;
+		chan->min = chan->max = 2;
 		snd_mask_none(fmt);
 		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
 	}
@@ -454,13 +454,13 @@  static struct snd_soc_ops kabylake_rt5663_ops = {
 static int kabylake_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;
 }