ASoC: Intel: fix machine driver warnings
authorFang, Yang A <yang.a.fang@intel.com>
Mon, 9 Feb 2015 08:18:12 +0000 (00:18 -0800)
committerMark Brown <broonie@kernel.org>
Mon, 23 Feb 2015 15:43:19 +0000 (00:43 +0900)
this patch will fix below sparse warnings

warning: incorrect type in argument 2 (different base types) expected
unsigned int [unsigned] val got restricted snd_pcm_format_t [usertype]
<noident>

sound/soc/intel/haswell.c:61:37
sound/soc/intel/broadwell.c:115:37:
sound/soc/intel/bytcr_dpcm_rt5640.c:118:37:
sound/soc/intel/cht_bsw_rt5672.c:183:37:
sound/soc/intel/cht_bsw_rt5645.c:208:37:

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/broadwell.c
sound/soc/intel/bytcr_dpcm_rt5640.c
sound/soc/intel/cht_bsw_rt5645.c
sound/soc/intel/cht_bsw_rt5672.c
sound/soc/intel/haswell.c

index 9cf7d01479adcbd82661c70344b5f5d4ad0969fe..fba2ef5dac4280d9e4c200352743999bc64eb562 100644 (file)
@@ -110,9 +110,7 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd,
        channels->min = channels->max = 2;
 
        /* set SSP0 to 16 bit */
-       snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
-                                   SNDRV_PCM_HW_PARAM_FIRST_MASK],
-                                   SNDRV_PCM_FORMAT_S16_LE);
+       params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);
        return 0;
 }
 
index 59308629043e62dd2c2fa0bcc9e4cb126d7a74ba..3b262d01c1b370b9166d8e152486874d26f2aebd 100644 (file)
@@ -113,9 +113,7 @@ static int byt_codec_fixup(struct snd_soc_pcm_runtime *rtd,
        channels->min = channels->max = 2;
 
        /* set SSP2 to 24-bit */
-       snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
-                                   SNDRV_PCM_HW_PARAM_FIRST_MASK],
-                                   SNDRV_PCM_FORMAT_S24_LE);
+       params_set_format(params, SNDRV_PCM_FORMAT_S24_LE);
        return 0;
 }
 
index bd29617a9ab9d2a2c396b05e25a858855529bb45..dd935255a0206f8e123e881c34eb94a8ac5be561 100644 (file)
@@ -203,9 +203,7 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd,
        channels->min = channels->max = 2;
 
        /* set SSP2 to 24-bit */
-       snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
-                                   SNDRV_PCM_HW_PARAM_FIRST_MASK],
-                                   SNDRV_PCM_FORMAT_S24_LE);
+       params_set_format(params, SNDRV_PCM_FORMAT_S24_LE);
        return 0;
 }
 
index ff016621583a63c85c96689270405cbc5640ab77..c56f9dfe2129dc3ec4fb347f78f5c38a7a3143e5 100644 (file)
@@ -178,9 +178,7 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd,
        channels->min = channels->max = 2;
 
        /* set SSP2 to 24-bit */
-       snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
-                                   SNDRV_PCM_HW_PARAM_FIRST_MASK],
-                                   SNDRV_PCM_FORMAT_S24_LE);
+       params_set_format(params, SNDRV_PCM_FORMAT_S24_LE);
        return 0;
 }
 
index 35edf51a52aa92b3ace9156d4b3557f3db2282aa..00fddd3f5dfb8f7350180b8b564d282d4918331b 100644 (file)
@@ -56,9 +56,7 @@ static int haswell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd,
        channels->min = channels->max = 2;
 
        /* set SSP0 to 16 bit */
-       snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
-                                   SNDRV_PCM_HW_PARAM_FIRST_MASK],
-                                   SNDRV_PCM_FORMAT_S16_LE);
+       params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);
        return 0;
 }