Skip to content

Commit

Permalink
ALSA: pcm_dmaengine: Use pcm_for_each_format() macro for PCM format i…
Browse files Browse the repository at this point in the history
…teration

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>
  • Loading branch information
tiwai committed Feb 10, 2020
1 parent f9b0c05 commit 89e0b9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/core/pcm_dmaengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down

0 comments on commit 89e0b9a

Please sign in to comment.