]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
rtc: use c99 initializers in structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Mon, 13 Oct 2014 22:52:26 +0000 (15:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Oct 2014 00:18:17 +0000 (02:18 +0200)
commit473b86451276d6d342ecd26d5e503163c30ea974
tree449d1522bfd7ee9719c3415e8a4594e238dc9d1d
parent87d672cbd512c8dca01423381c94ac3658db0a18
rtc: use c99 initializers in structures

Use c99 initializers for structures.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

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

@bad@
identifier decl.i1,i2;
expression e;
initializer list[decl.n] is;
@@

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

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-pcf8583.c