mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Takashi Iwai <tiwai@suse.de>
Cc: Bhumika Goyal <bhumirks@gmail.com>,
	alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	broonie@kernel.org, clemens@ladisch.de, julia.lawall@lip6.fr,
	linuxppc-dev@lists.ozlabs.org, perex@perex.cz,
	johannes@sipsolutions.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: declare snd_kcontrol_new structures as const
Date: Tue, 30 May 2017 10:56:39 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1705301056200.2981@hadrien> (raw)
In-Reply-To: <s5hvaoiencx.wl-tiwai@suse.de>



On Tue, 30 May 2017, Takashi Iwai wrote:

> On Sat, 27 May 2017 16:46:15 +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;
> >
> > Cross compiled these files:
> > sound/aoa/codecs/tas.c - powerpc
> > sound/mips/{hal2.c/sgio2audio.c} - mips
> > sound/ppc/{awacs.c/beep.c/tumbler.c} - powerpc
> > sound/soc/sh/siu_dai.c - sh
> > Could not find an architecture to compile sound/sh/aica.c.
> >
> > Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
>
> Applied now, as it looks safe enough.  But I prefer splitting to
> individual patches, so please try to do that at the next time.

Individual patches in a series?

julia

  parent reply	other threads:[~2017-05-30  8:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-27 14:46 Bhumika Goyal
2017-05-29 13:14 ` Mark Brown
2017-05-30  8:54 ` Takashi Iwai
2017-05-30  8:56   ` Bhumika Goyal
2017-05-30  8:56   ` Julia Lawall [this message]
2017-05-30  8:59     ` Bhumika Goyal
2017-05-30  9:03     ` Takashi Iwai

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=alpine.DEB.2.20.1705301056200.2981@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=bhumirks@gmail.com \
    --cc=broonie@kernel.org \
    --cc=clemens@ladisch.de \
    --cc=johannes@sipsolutions.net \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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®