public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Bhumika Goyal <bhumirks@gmail.com>
Cc: julia.lawall@lip6.fr, ludovic.desroches@microchip.com,
	jochen@scram.de, vadimp@mellanox.com, michaelsh@mellanox.com,
	benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
	andy.gross@linaro.org, david.brown@linaro.org,
	ldewangan@nvidia.com, thierry.reding@gmail.com,
	jonathanh@nvidia.com, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-tegra@vger.kernel.org
Subject: Re: [PATCH] i2c: busses: make i2c_adapter_quirks const
Date: Tue, 29 Aug 2017 22:33:40 +0200	[thread overview]
Message-ID: <20170829203340.cl2uiuqoaikwsvmv@ninjato> (raw)
In-Reply-To: <1503317524-21276-1-git-send-email-bhumirks@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

On Mon, Aug 21, 2017 at 05:42:04PM +0530, Bhumika Goyal wrote:
> Make these const as they are only stored as a reference in the quirks
> field of an i2c_adapter structure, which is const.
> 
> Done using Coccinelle:
> @match disable optional_qualifier@
> identifier s;
> @@
> static struct i2c_adapter_quirks s = {...};
> 
> @ref@
> position p;
> identifier match.s;
> @@
> s@p
> 
> @good1@
> identifier y;
> position ref.p;
> identifier match.s;
> @@
> struct i2c_adapter y = {...,.quirks=&s@p,...};
> 
> @good2@
> struct i2c_adapter y;
> identifier match.s;
> position ref.p;
> @@
> y.quirks = &s@p
> 
> @bad depends on  !good1 && !good2@
> position ref.p;
> identifier match.s;
> @@
> s@p
> 
> @depends on forall !bad disable optional_qualifier@
> identifier match.s;
> @@
> static
> + const
> struct i2c_adapter_quirks s;
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Removed the cocci script from the commit message and applied to
for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2017-08-29 20:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 12:12 [PATCH] i2c: busses: make i2c_adapter_quirks const Bhumika Goyal
2017-08-29 20:33 ` Wolfram Sang [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=20170829203340.cl2uiuqoaikwsvmv@ninjato \
    --to=wsa@the-dreams.de \
    --cc=andy.gross@linaro.org \
    --cc=benh@kernel.crashing.org \
    --cc=bhumirks@gmail.com \
    --cc=david.brown@linaro.org \
    --cc=jochen@scram.de \
    --cc=jonathanh@nvidia.com \
    --cc=julia.lawall@lip6.fr \
    --cc=ldewangan@nvidia.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=michaelsh@mellanox.com \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=thierry.reding@gmail.com \
    --cc=vadimp@mellanox.com \
    /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