kernel_optimize_test/sound/pci/ymfpci
Bhumika Goyal f3b827e0b1 ALSA: pci: constify snd_kcontrol_new structures
Declare snd_kcontrol_new structures as const as they are only passed as
an argument to the function snd_ctl_new1. This argument is of type
const, so snd_kcontrol_new structures having the same property can be
made const too.
Done using Coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct snd_kcontrol_new i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1;
@@
snd_ctl_new1(&i@p,e1)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct snd_kcontrol_new i;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-21 22:01:21 +01:00
..
Makefile
ymfpci_main.c ALSA: pci: constify snd_kcontrol_new structures 2017-02-21 22:01:21 +01:00
ymfpci.c ALSA: ymfpci: Remove always NULL parameters 2015-01-02 16:34:25 +01:00
ymfpci.h ALSA: pci: don't opencode IS_REACHABLE() 2016-11-13 21:33:41 +01:00