linux/sound/drivers
Bhumika Goyal 905e46acd3 ALSA: declare snd_kcontrol_new structures as const
Declare snd_kcontrol_new structures as const as they are only passed an
argument to the function snd_ctl_new1. This argument is of type const,
so snd_kcontrol_new structures having this property can be made const.
Done using Coccinelle:

@r disable optional_qualifier@
identifier x;
position p;
@@
static struct snd_kcontrol_new x@p={...};

@ok@
identifier r.x;
position p;
@@
snd_ctl_new1(&x@p,...)

@bad@
position p != {r.p,ok.p};
identifier r.x;
@@
x@p

@depends on !bad disable optional_qualifier@
identifier r.x;
@@
+const
struct snd_kcontrol_new x;

Cross compiled these files:
sound/aoa/codecs/tas.c - powerpc
sound/mips/{hal2.c/sgio2audio.c} - mips
sound/ppc/{awacs.c/beep.c/tumbler.c} - powerpc
sound/soc/sh/siu_dai.c - sh
Could not find an architecture to compile sound/sh/aica.c.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-30 10:29:25 +02:00
..
mpu401 Annotate hardware config module parameters in sound/drivers/ 2017-04-20 12:02:32 +01:00
opl3 ALSA: opl3: Kill unused set_fs() 2017-05-17 07:13:12 +02:00
opl4 ALSA: opl4: Use IS_REACHABLE() 2017-05-17 07:13:05 +02:00
pcsp ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
vx ALSA: declare snd_kcontrol_new structures as const 2017-05-30 10:29:25 +02:00
aloop.c ALSA: aloop: Drop unnecessary ifdef CONFIG_PROC_FS 2015-05-29 07:46:05 +02:00
dummy.c ALSA: dummy: Fix a use-after-free at closing 2016-06-24 15:18:32 +02:00
Kconfig
Makefile
ml403-ac97cr.c ALSA: Deletion of checks before the function call "iounmap" 2015-01-04 15:13:45 +01:00
mtpav.c Annotate hardware config module parameters in sound/drivers/ 2017-04-20 12:02:32 +01:00
mts64.c ALSA: drivers: Constify snd_rawmidi_ops 2017-01-12 12:50:06 +01:00
pcm-indirect2.c treewide: Fix typos in printk 2015-12-08 14:59:19 +01:00
pcm-indirect2.h
portman2x4.c ALSA: drivers: Constify snd_rawmidi_ops 2017-01-12 12:50:06 +01:00
serial-u16550.c Annotate hardware config module parameters in sound/drivers/ 2017-04-20 12:02:32 +01:00
virmidi.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00