From 7ed310bd51bec0b440a551fc4da1993c7f6cd231 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 22 Feb 2018 16:02:22 -0300 Subject: ASoC: soc-generic-dmaengine-pcm: Fix sparse warnings Currently the following sparse warnings are observed: sound/soc/soc-generic-dmaengine-pcm.c:185:34: warning: restricted snd_pcm_format_t degrades to integer sound/soc/soc-generic-dmaengine-pcm.c:186:66: warning: incorrect type in argument 1 (different base types) sound/soc/soc-generic-dmaengine-pcm.c:186:66: expected restricted snd_pcm_format_t [usertype] format sound/soc/soc-generic-dmaengine-pcm.c:186:66: got int [signed] [assigned] i Fix it by changing the loop variable to be of 'snd_pcm_format_t'. Also introduce a SNDRV_PCM_FORMAT_FIRST label, which corresponds to the first member (index 0) of the snd_pcm_format_t formats. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- include/uapi/sound/asound.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/uapi/sound/asound.h') diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index 07d61583fd02..ed0a120d4f08 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -242,6 +242,7 @@ typedef int __bitwise snd_pcm_format_t; #define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */ #define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */ #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE +#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8 #ifdef SNDRV_LITTLE_ENDIAN #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE -- cgit