]> git.baikalelectronics.ru Git - kernel.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)
commita6329d930ab5df28e2ee453e063f0bdc064d08a9
tree449d1522bfd7ee9719c3415e8a4594e238dc9d1d
parent5760e5354cab15048d11398275c92d15b97c9192
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