]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm/oss: mark snd_pcm_plug_slave_format arg as const
authorArnd Bergmann <arnd@arndb.de>
Thu, 18 May 2017 13:35:55 +0000 (15:35 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 18 May 2017 14:39:08 +0000 (16:39 +0200)
commit6a4b18fc9ffb0fad9396a92ab8e3d8d23cfe9b70
tree24379e9394a2caf874b3c84df9658134539b90a4
parent30d6d0f0bdd731a5d433afb6e104236ac217efd5
ALSA: pcm/oss: mark snd_pcm_plug_slave_format arg as const

Only one of the two declarations has the const modifier in the
argument list, so we get a warning when CONFIG_SND_PCM_OSS_PLUGINS
is disabled:

sound/core/oss/pcm_oss.c: In function 'snd_pcm_oss_change_params':
sound/core/oss/pcm_oss.c:898:47: error: passing argument 2 of 'snd_pcm_plug_slave_format' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]

This makes the two declarations match again.

Fixes: 5b088a0cfc1c ("ALSA: pcm/oss: refer to parameters instead of copying to reduce usage of kernel stack")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_plugin.h