diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2014-08-23 18:09:56 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-12 16:49:34 +0200 |
commit | d456ea2edc10ffa74cc226aacb9013c06e928858 (patch) | |
tree | 20454ed816f4f32e16d5f919f42b6e4f2377777f /drivers/gpu/drm/sti/sti_vtac.c | |
parent | drm: fix drm_modeset_lock.h kernel-doc notation (diff) | |
download | linux-d456ea2edc10ffa74cc226aacb9013c06e928858.tar.xz linux-d456ea2edc10ffa74cc226aacb9013c06e928858.zip |
drm: use c99 initializers in structures
Use c99 initializers for structures.
Drop 0 initializers in drivers/gpu/drm/sti/sti_vtac.c. A 0x0 initializer
is left in vtac_mode_aux in drivers/gpu/drm/sti/sti_vtac.c to highlight the
relation to vtac_mode_main.
A simplified version of the semantic match that finds the first 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>
v2: Drop 0 initializers and add trailing commas at the suggestions of Josh
Triplett.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/sti/sti_vtac.c')
-rw-r--r-- | drivers/gpu/drm/sti/sti_vtac.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sti/sti_vtac.c b/drivers/gpu/drm/sti/sti_vtac.c index 82a51d488434..97bcdac23ae1 100644 --- a/drivers/gpu/drm/sti/sti_vtac.c +++ b/drivers/gpu/drm/sti/sti_vtac.c @@ -56,8 +56,16 @@ struct sti_vtac_mode { u32 phyts_per_pixel; }; -static const struct sti_vtac_mode vtac_mode_main = {0x2, 0x2, VTAC_5_PPP}; -static const struct sti_vtac_mode vtac_mode_aux = {0x1, 0x0, VTAC_17_PPP}; +static const struct sti_vtac_mode vtac_mode_main = { + .vid_in_width = 0x2, + .phyts_width = 0x2, + .phyts_per_pixel = VTAC_5_PPP, +}; +static const struct sti_vtac_mode vtac_mode_aux = { + .vid_in_width = 0x1, + .phyts_width = 0x0, + .phyts_per_pixel = VTAC_17_PPP, +}; /** * VTAC structure |