lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 19 Feb 2017 22:07:07 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     "Bhumika Goyal" <bhumirks@...il.com>
Cc:     <alsa-devel@...a-project.org>, <clemens@...isch.de>,
        <julia.lawall@...6.fr>, <perex@...ex.cz>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ALSA: constify snd_kcontrol_new structures

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@...il.com>

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


thanks,

Takashi

Powered by blists - more mailing lists