summaryrefslogtreecommitdiff
path: root/sound/core/pcm_dmaengine.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-02-06 17:39:44 +0100
committerTakashi Iwai <tiwai@suse.de>2020-02-10 08:28:02 +0100
commit89e0b9a060febbf85b985d2f3aa6afea3473276e (patch)
treee1a2da9b34b4ac24ac27281f0e12228cc1eed9ad /sound/core/pcm_dmaengine.c
parentf9b0c053a29fdc0ad58e816554216523b29930f8 (diff)
ALSA: pcm_dmaengine: Use pcm_for_each_format() macro for PCM format iteration
The new macro can fix the sparse warnings gracefully: sound/core/pcm_dmaengine.c:429:50: warning: restricted snd_pcm_format_t degrades to integer sound/core/pcm_dmaengine.c:429:55: warning: restricted snd_pcm_format_t degrades to integer sound/core/pcm_dmaengine.c:429:79: warning: restricted snd_pcm_format_t degrades to integer No functional changes, just sparse warning fixes. Link: https://lore.kernel.org/r/20200206163945.6797-8-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_dmaengine.c')
-rw-r--r--sound/core/pcm_dmaengine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c
index 5749a8a49784..b37c70864b57 100644
--- a/sound/core/pcm_dmaengine.c
+++ b/sound/core/pcm_dmaengine.c
@@ -426,7 +426,7 @@ int snd_dmaengine_pcm_refine_runtime_hwparams(
* default assumption is that it supports 1, 2 and 4 bytes
* widths.
*/
- for (i = SNDRV_PCM_FORMAT_FIRST; i <= SNDRV_PCM_FORMAT_LAST; i++) {
+ pcm_for_each_format(i) {
int bits = snd_pcm_format_physical_width(i);
/*