mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: bhumirks@gmail.com, kernel-janitors@vger.kernel.org,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	Eric Anholt <eric@anholt.net>,
	linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 12/12] mmc: bcm2835: constify mmc_host_ops structures
Date: Mon, 31 Jul 2017 07:55:16 +0200	[thread overview]
Message-ID: <0beb2ef0-0a2d-5289-2956-af106d092cf6@i2se.com> (raw)
In-Reply-To: <1501307981-29745-13-git-send-email-Julia.Lawall@lip6.fr>

Am 29.07.2017 um 07:59 schrieb Julia Lawall:
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct mmc_host_ops i@p = { ... };
>
> @ok1@
> struct mmc_host *mmc;
> identifier r.i;
> position p;
> @@
> mmc->ops = &i@p
>
> @bad@
> position p != {r.p,ok1.p};
> identifier r.i;
> struct mmc_host_ops e;
> @@
> e@i@p
>
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct mmc_host_ops i = { ... };
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

  reply	other threads:[~2017-07-31  5:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-29  5:59 [PATCH 00/12] " Julia Lawall
2017-07-29  5:59 ` [PATCH 01/12] mmc: wmt-sdmmc: " Julia Lawall
2017-07-29  5:59 ` [PATCH 02/12] mmc: s3cmci: " Julia Lawall
2017-07-29  5:59 ` [PATCH 03/12] mmc: davinci: " Julia Lawall
2017-07-29  5:59 ` [PATCH 04/12] mmc: moxart: " Julia Lawall
2017-07-29  5:59 ` [PATCH 05/12] mmc: sh_mmcif: " Julia Lawall
2017-07-29  5:59 ` [PATCH 06/12] mmc: toshsd: " Julia Lawall
2017-07-29  5:59 ` [PATCH 07/12] mmc: usdhi6rol0: " Julia Lawall
2017-07-29  5:59 ` [PATCH 08/12] mmc: vub300: " Julia Lawall
2017-07-29  5:59 ` [PATCH 09/12] mmc: sunxi: " Julia Lawall
2017-07-29  5:59 ` [PATCH 10/12] mmc: sdricoh_cs: " Julia Lawall
2017-07-29  5:59 ` [PATCH 11/12] mmc: mediatek: " Julia Lawall
2017-07-29  5:59 ` [PATCH 12/12] mmc: bcm2835: " Julia Lawall
2017-07-31  5:55   ` Stefan Wahren [this message]
2017-07-31  8:52 ` [PATCH 00/12] " Ulf Hansson

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=0beb2ef0-0a2d-5289-2956-af106d092cf6@i2se.com \
    --to=stefan.wahren@i2se.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhumirks@gmail.com \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=ulf.hansson@linaro.org \
    /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®