From: Takashi Iwai Subject: Re: [PATCH] ALSA: ice1712: add const to snd_akm4xxx structures Date: Sun, 06 Aug 2017 22:17:41 +0200 Message-ID: References: <1501868970-3747-1-git-send-email-bhumirks@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1501868970-3747-1-git-send-email-bhumirks@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Bhumika Goyal Cc: alsa-devel@alsa-project.org, julia.lawall@lip6.fr, perex@perex.cz, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org On Fri, 04 Aug 2017 19:49:30 +0200, Bhumika Goyal wrote: > > Declare snd_akm4xxx 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_akm4xxx s@p={...}; > > @good1@ > identifier match.s; > position p; > @@ > snd_ice1712_akm4xxx_init(...,&s@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_akm4xxx s={...}; > > Signed-off-by: Bhumika Goyal Applied, thanks. Takashi