From: Takashi Iwai <tiwai@suse.de>
To: Bhumika Goyal <bhumirks@gmail.com>
Cc: alsa-devel@alsa-project.org, Julia Lawall <julia.lawall@lip6.fr>,
perex@perex.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: sound/isa: constify snd_kcontrol_new structures
Date: Sun, 21 May 2017 09:09:21 +0200 [thread overview]
Message-ID: <s5h7f1ak7oe.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAOH+1jGYQpTsfaMSUF+iGuj6uERkb_PK_nJO_KZu42e05E5r5g@mail.gmail.com>
On Wed, 17 May 2017 14:33:45 +0200,
Bhumika Goyal wrote:
>
> On Wed, May 17, 2017 at 5:50 PM, Takashi Iwai <tiwai@suse.de> wrote:
> > On Wed, 17 May 2017 13:38:56 +0200,
> > Bhumika Goyal wrote:
> >>
> >> Declare snd_kcontrol_new structures as const as they are only passed an
> >> argument to the function snd_ctl_new1. This argument is of type const,
> >> so snd_kcontrol_new structures having this property can be made const.
> >> Done using Coccinelle:
> >>
> >> @r disable optional_qualifier@
> >> identifier x;
> >> position p;
> >> @@
> >> static struct snd_kcontrol_new x@p={...};
> >>
> >> @ok@
> >> identifier r.x;
> >> position p;
> >> @@
> >> snd_ctl_new1(&x@p,...)
> >>
> >> @bad@
> >> position p != {r.p,ok.p};
> >> identifier r.x;
> >> @@
> >> x@p
> >>
> >> @depends on !bad disable optional_qualifier@
> >> identifier r.x;
> >> @@
> >> +const
> >> struct snd_kcontrol_new x;
> >>
> >> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> >
> > As I already asked, could you send as a patchset if you have multiple
> > similar patches?
> >
>
> Sure. Will combine the already sent ones and some new ones into a
> patchset and send again.
Well, since there haven't been new submissions and the patches are
trivial, I applied the existing four patches. If you have newer ones,
please submit as a patchset.
thanks,
Takashi
next prev parent reply other threads:[~2017-05-21 7:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 11:38 Bhumika Goyal
2017-05-17 12:20 ` Takashi Iwai
2017-05-17 12:33 ` Bhumika Goyal
2017-05-21 7:09 ` Takashi Iwai [this message]
2017-05-22 5:52 ` Bhumika Goyal
2017-05-22 6:20 ` Julia Lawall
2017-05-22 6:29 ` Takashi Iwai
2017-05-22 6:31 ` Bhumika Goyal
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=s5h7f1ak7oe.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=bhumirks@gmail.com \
--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®