From: Takashi Iwai <tiwai@suse.de>
To: "Bhumika Goyal" <bhumirks@gmail.com>
Cc: <alsa-devel@alsa-project.org>, <clemens@ladisch.de>,
<julia.lawall@lip6.fr>, <perex@perex.cz>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ALSA: constify snd_kcontrol_new structures
Date: Sun, 19 Feb 2017 22:07:07 +0100 [thread overview]
Message-ID: <s5ha89hritg.wl-tiwai@suse.de> (raw)
In-Reply-To: <1487530089-6361-1-git-send-email-bhumirks@gmail.com>
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@gmail.com>
It's too large for a change at a minute before the merge window.
I'll postpone this for 4.12.
thanks,
Takashi
prev parent reply other threads:[~2017-02-19 21:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-19 18:48 Bhumika Goyal
2017-02-19 21:07 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5ha89hritg.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=bhumirks@gmail.com \
--cc=clemens@ladisch.de \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®