]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: Intel: rename shadowed variable for all broadwell boards
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 13 Aug 2020 17:58:37 +0000 (12:58 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 17 Aug 2020 14:42:58 +0000 (15:42 +0100)
Fix cppcheck warnings:

sound/soc/intel/boards/bdw-rt5650.c:91:23: style: Local variable
'channels' shadows outer variable [shadowVariable]

sound/soc/intel/boards/bdw-rt5677.c:144:23: style: Local variable
'channels' shadows outer variable [shadowVariable]

sound/soc/intel/boards/broadwell.c:91:23: style: Local variable
'channels' shadows outer variable [shadowVariable]

This was fixed earlier in other machine drivers but keeps coming back
with copy/paste.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813175839.59422-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bdw-rt5650.c
sound/soc/intel/boards/bdw-rt5677.c
sound/soc/intel/boards/broadwell.c

index ce7320916b22b797ccf85ebbab25f921ecbb97ae..1412a9941ed4178c77378c32512fa4543f68f4d2 100644 (file)
@@ -87,14 +87,14 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd,
                        struct snd_pcm_hw_params *params)
 {
        struct snd_interval *rate = hw_param_interval(params,
-                       SNDRV_PCM_HW_PARAM_RATE);
-       struct snd_interval *channels = hw_param_interval(params,
-                                               SNDRV_PCM_HW_PARAM_CHANNELS);
+                                                     SNDRV_PCM_HW_PARAM_RATE);
+       struct snd_interval *chan = hw_param_interval(params,
+                                                     SNDRV_PCM_HW_PARAM_CHANNELS);
 
        /* The ADSP will covert the FE rate to 48k, max 4-channels */
        rate->min = rate->max = 48000;
-       channels->min = 2;
-       channels->max = 4;
+       chan->min = 2;
+       chan->max = 4;
 
        /* set SSP0 to 24 bit */
        snd_mask_set_format(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT),
index 86e427e3822f74645eac234735f54c5c7f538d4f..297871bcaf5d305c133a50585aa70315d8dbc8bb 100644 (file)
@@ -140,13 +140,13 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd,
                        struct snd_pcm_hw_params *params)
 {
        struct snd_interval *rate = hw_param_interval(params,
-                       SNDRV_PCM_HW_PARAM_RATE);
-       struct snd_interval *channels = hw_param_interval(params,
-                                               SNDRV_PCM_HW_PARAM_CHANNELS);
+                                                     SNDRV_PCM_HW_PARAM_RATE);
+       struct snd_interval *chan = hw_param_interval(params,
+                                                     SNDRV_PCM_HW_PARAM_CHANNELS);
 
        /* 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 16 bit */
        params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);
index f6399077d29195e9a0bb4dfa22d9dcbaca76e297..56972af13b6f6e1b3038406d6d95756351995bca 100644 (file)
@@ -87,13 +87,13 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd,
                        struct snd_pcm_hw_params *params)
 {
        struct snd_interval *rate = hw_param_interval(params,
-                       SNDRV_PCM_HW_PARAM_RATE);
-       struct snd_interval *channels = hw_param_interval(params,
-                                               SNDRV_PCM_HW_PARAM_CHANNELS);
+                                                     SNDRV_PCM_HW_PARAM_RATE);
+       struct snd_interval *chan = hw_param_interval(params,
+                                                     SNDRV_PCM_HW_PARAM_CHANNELS);
 
        /* 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 16 bit */
        params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);