ASoC: soc-generic-dmaengine-pcm: Fix sparse warnings
authorFabio Estevam <fabio.estevam@nxp.com>
Thu, 22 Feb 2018 19:02:22 +0000 (16:02 -0300)
committerMark Brown <broonie@kernel.org>
Mon, 26 Feb 2018 11:05:12 +0000 (11:05 +0000)
commit7ed310bd51bec0b440a551fc4da1993c7f6cd231
treead82518887a3f993e0595c24179416d385fe6eee
parentf91b1e73ccde71d4bc69ae10d475196df38844ab
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 <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/uapi/sound/asound.h
sound/soc/soc-generic-dmaengine-pcm.c