Re: [PATCH] ALSA: constify snd_kcontrol_new structures

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

 



On Sun, 19 Feb 2017 19:48:09 +0100,
Bhumika Goyal wrote:
> 
> 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@xxxxxxxxx>

It's too large for a change at a minute before the merge window.
I'll postpone this for 4.12.


thanks,

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



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

  Powered by Linux