[alsa-devel] [PATCH 5/6] ASoC: pcm186x: Declare PCM format with snd_pcm_format_t

Takashi Iwai tiwai at suse.de
Wed Jul 25 23:17:21 CEST 2018


The PCM format type is with __bitwise, so we should use the dedicated
snd_pcm_format_t instead of int.

This fixes the sparse warning like:
  sound/soc/codecs/pcm186x.c:268:44: warning: incorrect type in initializer (different base types)

Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/soc/codecs/pcm186x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/pcm186x.c b/sound/soc/codecs/pcm186x.c
index 88fde70b1e9e..690c26e7389e 100644
--- a/sound/soc/codecs/pcm186x.c
+++ b/sound/soc/codecs/pcm186x.c
@@ -265,7 +265,7 @@ static int pcm186x_hw_params(struct snd_pcm_substream *substream,
 	struct snd_soc_component *component = dai->component;
 	struct pcm186x_priv *priv = snd_soc_component_get_drvdata(component);
 	unsigned int rate = params_rate(params);
-	unsigned int format = params_format(params);
+	snd_pcm_format_t format = params_format(params);
 	unsigned int width = params_width(params);
 	unsigned int channels = params_channels(params);
 	unsigned int div_lrck;
-- 
2.18.0



More information about the Alsa-devel mailing list