OpenCloudOS-Kernel/sound/pci/echoaudio
Olof Johansson c08f0a92f4 ALSA: echoaudio: simplify get_audio_levels
The loop optimizer seems to go astray here, and produces some warnings
that don't seem valid.

Still, the code can be simplified -- just clear the whole array at the
beginning, and fill in whatever values are valid on the platform.

Warnings before this change (GCC 8.2.0 ARM allmodconfig):

In file included from ../sound/pci/echoaudio/gina24.c:115:
../sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_vumeters_get':
../sound/pci/echoaudio/echoaudio_dsp.c:647:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations]
In file included from ../sound/pci/echoaudio/layla24.c:112:
../sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_vumeters_get':
../sound/pci/echoaudio/echoaudio_dsp.c:658:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations]
../sound/pci/echoaudio/echoaudio_dsp.c:647:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations]

Signed-off-by: Olof Johansson <olof@lixom.net>
Link: https://lore.kernel.org/r/20191207224953.25944-1-olof@lixom.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-08 09:47:43 +01:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
darla20.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
darla20_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
darla24.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
darla24_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
echo3g.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
echo3g_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
echoaudio.c ALSA: echoaudio: Avoid non-standard macro usage 2019-11-06 15:47:43 +01:00
echoaudio.h ALSA: echoaudio: Proper endian notations 2018-07-27 09:06:09 +02:00
echoaudio_3g.c ALSA: echoaudio: Proper endian notations 2018-07-27 09:06:09 +02:00
echoaudio_dsp.c ALSA: echoaudio: simplify get_audio_levels 2019-12-08 09:47:43 +01:00
echoaudio_dsp.h ALSA: echoaudio: Proper endian notations 2018-07-27 09:06:09 +02:00
echoaudio_gml.c ALSA: echoaudio: Proper endian notations 2018-07-27 09:06:09 +02:00
gina20.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
gina20_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
gina24.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
gina24_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
indigo.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
indigo_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
indigo_express_dsp.c ALSA: echoaudio: remove all snd_printk 2014-11-03 14:07:25 +01:00
indigodj.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
indigodj_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
indigodjx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
indigodjx_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
indigoio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
indigoio_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
indigoiox.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
indigoiox_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
layla20.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
layla20_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
layla24.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
layla24_dsp.c ALSA: echoaudio: Fix improper return value in function load_asic 2016-11-29 19:59:57 +01:00
mia.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
mia_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
midi.c ALSA: Convert timers to use timer_setup() 2017-10-26 14:44:59 +02:00
mona.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
mona_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00