[PATCH 8/9] ASoC: Intel: Atom: work-around Coccinelle false-alarm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Coccinelle complains:
sst-atom-controls.c:1534:2-19: ERROR: Assignment of bool to non-0/1
constant

false alarm: that constant is declared as

Using a test that will be optimized away to work-around the issue

Cc: Julia Lawall <julia.lawall@xxxxxxx>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
---
 sound/soc/intel/atom/sst-atom-controls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/atom/sst-atom-controls.c b/sound/soc/intel/atom/sst-atom-controls.c
index d1207ea53523..d00990852fdf 100644
--- a/sound/soc/intel/atom/sst-atom-controls.c
+++ b/sound/soc/intel/atom/sst-atom-controls.c
@@ -1531,7 +1531,7 @@ int sst_dsp_init_v2_dpcm(struct snd_soc_component *component)
 	snd_soc_dapm_new_widgets(dapm->card);
 
 	for (i = 0; i < gains; i++) {
-		sst_gains[i].mute = SST_GAIN_MUTE_DEFAULT;
+		sst_gains[i].mute = SST_GAIN_MUTE_DEFAULT ? true : false;
 		sst_gains[i].l_gain = SST_GAIN_VOLUME_DEFAULT;
 		sst_gains[i].r_gain = SST_GAIN_VOLUME_DEFAULT;
 		sst_gains[i].ramp_duration = SST_GAIN_RAMP_DURATION_DEFAULT;
-- 
2.17.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux