Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1704961
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ALSA: ice1712: add const to snd_akm4xxx structures |
| Date | 2017-08-06 22:20 +0200 |
| Message-ID | <ubAbM-6NP-19@gated-at.bofh.it> (permalink) |
| References | <uaOTw-1E9-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 <bhumirks@gmail.com>
Applied, thanks.
Takashi
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] ALSA: ice1712: add const to snd_akm4xxx structures Bhumika Goyal <bhumirks@gmail.com> - 2017-08-04 19:50 +0200 Re: [PATCH] ALSA: ice1712: add const to snd_akm4xxx structures Takashi Iwai <tiwai@suse.de> - 2017-08-06 22:20 +0200
csiph-web