]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
video: fbdev: intelfb: delete double assignment
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 23 Aug 2014 18:33:23 +0000 (20:33 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 26 Aug 2014 12:53:34 +0000 (15:53 +0300)
Delete successive assignments to the same location.

In the second case, = is converted to |=, which looks appropriate based on
the values involved.

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

// <smpl>
@@
expression i;
@@

*i = ...;
 i = ...;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/intelfb/intelfbhw.c

index fbad61da359f796b579ae74b1dc01a78d888d4a9..d31ed4e2c46f1020ab84e8899337c3bd82fabd18 100644 (file)
@@ -1191,7 +1191,6 @@ int intelfbhw_mode_to_hw(struct intelfb_info *dinfo,
        vsync_end = vsync_start + var->vsync_len;
        vtotal = vsync_end + var->upper_margin;
        vblank_start = vactive;
-       vblank_end = vtotal;
        vblank_end = vsync_end + 1;
 
        DBG_MSG("V: act %d, ss %d, se %d, tot %d bs %d, be %d\n",
@@ -1859,7 +1858,7 @@ void intelfbhw_cursor_init(struct intelfb_info *dinfo)
                tmp = INREG(CURSOR_CONTROL);
                tmp &= ~(CURSOR_FORMAT_MASK | CURSOR_GAMMA_ENABLE |
                         CURSOR_ENABLE | CURSOR_STRIDE_MASK);
-               tmp = CURSOR_FORMAT_3C;
+               tmp |= CURSOR_FORMAT_3C;
                OUTREG(CURSOR_CONTROL, tmp);
                OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.offset << 12);
                tmp = (64 << CURSOR_SIZE_H_SHIFT) |