All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Wim Van Sebroeck <wim@iguana.be>,
	kernel-janitors@vger.kernel.org,
	Guenter Roeck <linux@roeck-us.net>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	linux-watchdog@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] watchdog: tegra: constify watchdog_ops structures
Date: Tue, 06 Sep 2016 09:13:11 +0000	[thread overview]
Message-ID: <20160906091311.GD15644@ulmo.ba.sec> (raw)
In-Reply-To: <1472751326-22897-2-git-send-email-Julia.Lawall@lip6.fr>

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

On Thu, Sep 01, 2016 at 07:35:25PM +0200, Julia Lawall wrote:
> Check for watchdog_ops structures that are only stored in the ops field of
> a watchdog_device structure.  This field is declared const, so watchdog_ops
> structures that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct watchdog_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct watchdog_device e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct watchdog_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct watchdog_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/watchdog/tegra_wdt.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Thierry Reding <treding@nvidia.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Wim Van Sebroeck <wim@iguana.be>,
	kernel-janitors@vger.kernel.org,
	Guenter Roeck <linux@roeck-us.net>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	linux-watchdog@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] watchdog: tegra: constify watchdog_ops structures
Date: Tue, 6 Sep 2016 11:13:11 +0200	[thread overview]
Message-ID: <20160906091311.GD15644@ulmo.ba.sec> (raw)
In-Reply-To: <1472751326-22897-2-git-send-email-Julia.Lawall@lip6.fr>

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

On Thu, Sep 01, 2016 at 07:35:25PM +0200, Julia Lawall wrote:
> Check for watchdog_ops structures that are only stored in the ops field of
> a watchdog_device structure.  This field is declared const, so watchdog_ops
> structures that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct watchdog_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct watchdog_device e;
> position p;
> @@
> e.ops = &i@p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct watchdog_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct watchdog_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/watchdog/tegra_wdt.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Thierry Reding <treding@nvidia.com>

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

  reply	other threads:[~2016-09-06  9:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 17:35 [PATCH 0/2] constify watchdog_ops structures Julia Lawall
2016-09-01 17:35 ` Julia Lawall
     [not found] ` <1472751326-22897-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2016-09-01 17:35   ` [PATCH 1/2] watchdog: tegra: " Julia Lawall
2016-09-01 17:35     ` Julia Lawall
2016-09-01 17:35     ` Julia Lawall
2016-09-06  9:13     ` Thierry Reding [this message]
2016-09-06  9:13       ` Thierry Reding
     [not found]     ` <1472751326-22897-2-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2016-09-09  4:28       ` Guenter Roeck
2016-09-09  4:28         ` Guenter Roeck
2016-09-09  4:28         ` Guenter Roeck
2016-09-01 17:35 ` [PATCH 2/2] watchdog: " Julia Lawall
2016-09-01 17:35   ` Julia Lawall
2016-09-09  4:29   ` Guenter Roeck
2016-09-09  4:29     ` Guenter Roeck

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=20160906091311.GD15644@ulmo.ba.sec \
    --to=thierry.reding@gmail.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=gnurou@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=swarren@wwwdotorg.org \
    --cc=wim@iguana.be \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.