video: fbdev: aty: use c99 initializers in structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 23 Aug 2014 15:50:28 +0000 (17:50 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 26 Aug 2014 12:52:39 +0000 (15:52 +0300)
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>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/aty/aty128fb.c

index ff6070170d018721349b2b604113bf019653ee7f..aedf2fbf9bf61f1e652f1e1353a1f54535a983a2 100644 (file)
@@ -324,14 +324,61 @@ struct aty128_meminfo {
 };
 
 /* various memory configurations */
-static const struct aty128_meminfo sdr_128   =
-       { 4, 4, 3, 3, 1, 3, 1, 16, 30, 16, "128-bit SDR SGRAM (1:1)" };
-static const struct aty128_meminfo sdr_64    =
-       { 4, 8, 3, 3, 1, 3, 1, 17, 46, 17, "64-bit SDR SGRAM (1:1)" };
-static const struct aty128_meminfo sdr_sgram =
-       { 4, 4, 1, 2, 1, 2, 1, 16, 24, 16, "64-bit SDR SGRAM (2:1)" };
-static const struct aty128_meminfo ddr_sgram =
-       { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" };
+static const struct aty128_meminfo sdr_128 = {
+       .ML = 4,
+       .MB = 4,
+       .Trcd = 3,
+       .Trp = 3,
+       .Twr = 1,
+       .CL = 3,
+       .Tr2w = 1,
+       .LoopLatency = 16,
+       .DspOn = 30,
+       .Rloop = 16,
+       .name = "128-bit SDR SGRAM (1:1)",
+};
+
+static const struct aty128_meminfo sdr_64 = {
+       .ML = 4,
+       .MB = 8,
+       .Trcd = 3,
+       .Trp = 3,
+       .Twr = 1,
+       .CL = 3,
+       .Tr2w = 1,
+       .LoopLatency = 17,
+       .DspOn = 46,
+       .Rloop = 17,
+       .name = "64-bit SDR SGRAM (1:1)",
+};
+
+static const struct aty128_meminfo sdr_sgram = {
+       .ML = 4,
+       .MB = 4,
+       .Trcd = 1,
+       .Trp = 2,
+       .Twr = 1,
+       .CL = 2,
+       .Tr2w = 1,
+       .LoopLatency = 16,
+       .DspOn = 24,
+       .Rloop = 16,
+       .name = "64-bit SDR SGRAM (2:1)",
+};
+
+static const struct aty128_meminfo ddr_sgram = {
+       .ML = 4,
+       .MB = 4,
+       .Trcd = 3,
+       .Trp = 3,
+       .Twr = 2,
+       .CL = 3,
+       .Tr2w = 1,
+       .LoopLatency = 16,
+       .DspOn = 31,
+       .Rloop = 16,
+       .name = "64-bit DDR SGRAM",
+};
 
 static struct fb_fix_screeninfo aty128fb_fix = {
        .id             = "ATY Rage128",
This page took 0.028171 seconds and 5 git commands to generate.