Re: [PATCH] ALSA: ice1712: add const to snd_ak4xxx_private structures

2017-08-06 Thread Takashi Iwai
On Fri, 04 Aug 2017 17:34:41 +0200,
Bhumika Goyal wrote:
> 
> Declare snd_ak4xxx_private structures  as const as they are only passed
> to the function snd_ice1712_akm4xxx_init. This argument is of type const,
> so make the structures const.
> Done using Coccinelle:
> 
> @match disable optional_qualifier@
> identifier s;
> position p;
> @@
> static struct snd_ak4xxx_private s@p={...};
> 
> @good1@
> identifier match.s;
> position p;
> @@
> snd_ice1712_akm4xxx_init(...,@p,...)
> 
> @bad@
> identifier match.s;
> position p!={match.p,good1.p};
> @@
> s@p
> 
> @depends on !bad disable optional_qualifier@
> identifier match.s;
> @@
> static
> +const
> struct snd_ak4xxx_private s={...};
> 
> Signed-off-by: Bhumika Goyal 

Applied, thanks.


Takashi


Re: [PATCH] ALSA: ice1712: add const to snd_ak4xxx_private structures

2017-08-06 Thread Takashi Iwai
On Fri, 04 Aug 2017 17:34:41 +0200,
Bhumika Goyal wrote:
> 
> Declare snd_ak4xxx_private structures  as const as they are only passed
> to the function snd_ice1712_akm4xxx_init. This argument is of type const,
> so make the structures const.
> Done using Coccinelle:
> 
> @match disable optional_qualifier@
> identifier s;
> position p;
> @@
> static struct snd_ak4xxx_private s@p={...};
> 
> @good1@
> identifier match.s;
> position p;
> @@
> snd_ice1712_akm4xxx_init(...,@p,...)
> 
> @bad@
> identifier match.s;
> position p!={match.p,good1.p};
> @@
> s@p
> 
> @depends on !bad disable optional_qualifier@
> identifier match.s;
> @@
> static
> +const
> struct snd_ak4xxx_private s={...};
> 
> Signed-off-by: Bhumika Goyal 

Applied, thanks.


Takashi