All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: dri-devel@lists.freedesktop.org
Cc: josh@joshtriplett.org, kernel-janitors@vger.kernel.org,
	linux-nfc@lists.01.org, linux-wireless@vger.kernel.org,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org, linux-pwm@vger.kernel.org,
	devel@driverdev.osuosl.org, linux-omap@vger.kernel.org,
	rtc-linux@googlegroups.com
Subject: [PATCH 0/9] use c99 initializers in structures
Date: Sat, 23 Aug 2014 13:20:22 +0200	[thread overview]
Message-ID: <1408792831-25615-1-git-send-email-Julia.Lawall@lip6.fr> (raw)

These patches add labels in the initializations of structure fields (c99
initializers).  The complete semantic patch thta makes this change is shown
below.  This rule ignores cases where the initialization is just 0 or NULL,
where some of the fields already use labels, and where there are nested
structures.

// <smpl>
@ok1@
identifier i1,i2;
position p;
@@

struct i1 i2@p = { \(0\|NULL\) };

@ok2@
identifier i1,i2,i3;
position p;
expression e;
@@

struct i1 i2@p = { ..., .i3 = e, ... };

@ok3@
identifier i1,i2;
position p;
@@

struct i1 i2@p = { ..., { ... }, ... };

@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
position p != {ok1.p,ok2.p,ok3.p};
constant nm;
initializer list[decl.n] is;
position fix;
@@

struct i1 i2@p = { is,
(
 nm(...)
|
 e@fix
)
 ,...};

@@
identifier decl.i1,i2,decl.fld;
expression e;
position bad.p, bad.fix;
@@

struct i1 i2@p = { ...,
+ .fld = e
- e@fix
 ,...};
// </smpl>


WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: dri-devel@lists.freedesktop.org
Cc: josh@joshtriplett.org, kernel-janitors@vger.kernel.org,
	linux-nfc@ml01.01.org, linux-wireless@vger.kernel.org,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org, linux-pwm@vger.kernel.org,
	devel@driverdev.osuosl.org, linux-omap@vger.kernel.org,
	rtc-linux@googlegroups.com
Subject: [PATCH 0/9] use c99 initializers in structures
Date: Sat, 23 Aug 2014 13:20:22 +0200	[thread overview]
Message-ID: <1408792831-25615-1-git-send-email-Julia.Lawall@lip6.fr> (raw)

These patches add labels in the initializations of structure fields (c99
initializers).  The complete semantic patch thta makes this change is shown
below.  This rule ignores cases where the initialization is just 0 or NULL,
where some of the fields already use labels, and where there are nested
structures.

// <smpl>
@ok1@
identifier i1,i2;
position p;
@@

struct i1 i2@p = { \(0\|NULL\) };

@ok2@
identifier i1,i2,i3;
position p;
expression e;
@@

struct i1 i2@p = { ..., .i3 = e, ... };

@ok3@
identifier i1,i2;
position p;
@@

struct i1 i2@p = { ..., { ... }, ... };

@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
position p != {ok1.p,ok2.p,ok3.p};
constant nm;
initializer list[decl.n] is;
position fix;
@@

struct i1 i2@p = { is,
(
 nm(...)
|
 e@fix
)
 ,...};

@@
identifier decl.i1,i2,decl.fld;
expression e;
position bad.p, bad.fix;
@@

struct i1 i2@p = { ...,
+ .fld = e
- e@fix
 ,...};
// </smpl>


WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: dri-devel@lists.freedesktop.org
Cc: devel@driverdev.osuosl.org, linux-pwm@vger.kernel.org,
	linux-fbdev@vger.kernel.org, rtc-linux@googlegroups.com,
	linux-nfc@lists.01.org, kernel-janitors@vger.kernel.org,
	linux-wireless@vger.kernel.org, josh@joshtriplett.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-media@vger.kernel.org
Subject: [PATCH 0/9] use c99 initializers in structures
Date: Sat, 23 Aug 2014 11:20:22 +0000	[thread overview]
Message-ID: <1408792831-25615-1-git-send-email-Julia.Lawall@lip6.fr> (raw)

These patches add labels in the initializations of structure fields (c99
initializers).  The complete semantic patch thta makes this change is shown
below.  This rule ignores cases where the initialization is just 0 or NULL,
where some of the fields already use labels, and where there are nested
structures.

// <smpl>
@ok1@
identifier i1,i2;
position p;
@@

struct i1 i2@p = { \(0\|NULL\) };

@ok2@
identifier i1,i2,i3;
position p;
expression e;
@@

struct i1 i2@p = { ..., .i3 = e, ... };

@ok3@
identifier i1,i2;
position p;
@@

struct i1 i2@p = { ..., { ... }, ... };

@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
position p != {ok1.p,ok2.p,ok3.p};
constant nm;
initializer list[decl.n] is;
position fix;
@@

struct i1 i2@p = { is,
(
 nm(...)
|
 e@fix
)
 ,...};

@@
identifier decl.i1,i2,decl.fld;
expression e;
position bad.p, bad.fix;
@@

struct i1 i2@p = { ...,
+ .fld = e
- e@fix
 ,...};
// </smpl>


WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: dri-devel@lists.freedesktop.org
Cc: devel@driverdev.osuosl.org, linux-pwm@vger.kernel.org,
	linux-fbdev@vger.kernel.org, rtc-linux@googlegroups.com,
	linux-nfc@lists.01.org, kernel-janitors@vger.kernel.org,
	linux-wireless@vger.kernel.org, josh@joshtriplett.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-media@vger.kernel.org
Subject: [PATCH 0/9] use c99 initializers in structures
Date: Sat, 23 Aug 2014 13:20:22 +0200	[thread overview]
Message-ID: <1408792831-25615-1-git-send-email-Julia.Lawall@lip6.fr> (raw)

These patches add labels in the initializations of structure fields (c99
initializers).  The complete semantic patch thta makes this change is shown
below.  This rule ignores cases where the initialization is just 0 or NULL,
where some of the fields already use labels, and where there are nested
structures.

// <smpl>
@ok1@
identifier i1,i2;
position p;
@@

struct i1 i2@p = { \(0\|NULL\) };

@ok2@
identifier i1,i2,i3;
position p;
expression e;
@@

struct i1 i2@p = { ..., .i3 = e, ... };

@ok3@
identifier i1,i2;
position p;
@@

struct i1 i2@p = { ..., { ... }, ... };

@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
position p != {ok1.p,ok2.p,ok3.p};
constant nm;
initializer list[decl.n] is;
position fix;
@@

struct i1 i2@p = { is,
(
 nm(...)
|
 e@fix
)
 ,...};

@@
identifier decl.i1,i2,decl.fld;
expression e;
position bad.p, bad.fix;
@@

struct i1 i2@p = { ...,
+ .fld = e
- e@fix
 ,...};
// </smpl>

             reply	other threads:[~2014-08-23 11:24 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-23 11:20 Julia Lawall [this message]
2014-08-23 11:20 ` [PATCH 0/9] use c99 initializers in structures Julia Lawall
2014-08-23 11:20 ` Julia Lawall
2014-08-23 11:20 ` Julia Lawall
2014-08-23 11:20 ` [PATCH 1/9] [media] v4l: ti-vpe: " Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-23 11:20 ` [PATCH 2/9] video: fbdev: matrox: " Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-23 11:20 ` [PATCH 3/9] pwm: lpss: " Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-25  9:44   ` Thierry Reding
2014-08-25  9:44     ` Thierry Reding
2014-08-23 11:20 ` [PATCH 4/9] NFC: " Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-23 11:20 ` [PATCH 5/9] lustre: obdclass: " Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-23 11:20 ` [PATCH 6/9] drm: " Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-23 15:16   ` Josh Triplett
2014-08-23 15:16     ` Josh Triplett
2014-08-23 16:09     ` [PATCH 6/9 v2] " Julia Lawall
2014-08-23 16:09       ` Julia Lawall
2014-08-25 13:18       ` Daniel Vetter
2014-08-25 13:18         ` Daniel Vetter
2014-08-23 11:20 ` [PATCH 7/9] OMAPDSS: DSI: " Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-23 11:20 ` [PATCH 8/9] video: fbdev: aty: " Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-23 15:20   ` Josh Triplett
2014-08-23 15:20     ` Josh Triplett
2014-08-23 15:32     ` Julia Lawall
2014-08-23 15:32       ` Julia Lawall
2014-08-23 16:03       ` Josh Triplett
2014-08-23 16:03         ` Josh Triplett
2014-08-25 10:16       ` Dan Carpenter
2014-08-25 10:16         ` Dan Carpenter
2014-08-23 15:50     ` [PATCH 8/9 v2] " Julia Lawall
2014-08-23 15:50       ` Julia Lawall
2014-08-23 16:03       ` Josh Triplett
2014-08-23 16:03         ` Josh Triplett
2014-08-26 10:43       ` Tomi Valkeinen
2014-08-26 10:43         ` Tomi Valkeinen
2014-08-23 11:20 ` [PATCH 9/9] rtc: " Julia Lawall
2014-08-23 11:20   ` Julia Lawall
2014-08-23 15:21 ` [PATCH 0/9] " Josh Triplett
2014-08-23 15:21   ` Josh Triplett
2014-08-23 15:21   ` Josh Triplett

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=1408792831-25615-1-git-send-email-Julia.Lawall@lip6.fr \
    --to=julia.lawall@lip6.fr \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=josh@joshtriplett.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-nfc@lists.01.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rtc-linux@googlegroups.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 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.