[PATCH 12/14] drivers/video/omap/blizzard.c: delete double assignment

Subsystems: framebuffer layer, the rest

STALE5766d

2 messages, 2 authors, 2010-10-26 · open the first message on its own page

[PATCH 12/14] drivers/video/omap/blizzard.c: delete double assignment

From: Julia Lawall <hidden>
Date: 2010-10-26 10:19:04

From: Julia Lawall <redacted>

Delete successive assignments to the same location.  Initialize the out_y
field as well as the out_x field, rather than initializing the out_x field
twice.

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 <redacted>

---
This changes the semantics and has not been tested.

 drivers/video/omap/blizzard.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/omap/blizzard.c b/drivers/video/omap/blizzard.c
index 2ffb34a..87785c2 100644
--- a/drivers/video/omap/blizzard.c
+++ b/drivers/video/omap/blizzard.c
@@ -1590,7 +1590,7 @@ static int blizzard_init(struct omapfb_device *fbdev, int ext_mode,
 	blizzard.auto_update_window.width = fbdev->panel->x_res;
 	blizzard.auto_update_window.height = fbdev->panel->y_res;
 	blizzard.auto_update_window.out_x = 0;
-	blizzard.auto_update_window.out_x = 0;
+	blizzard.auto_update_window.out_y = 0;
 	blizzard.auto_update_window.out_width = fbdev->panel->x_res;
 	blizzard.auto_update_window.out_height = fbdev->panel->y_res;
 	blizzard.auto_update_window.format = 0;

Re: [PATCH 12/14] drivers/video/omap/blizzard.c: delete double assignment

From: Nicolas Kaiser <hidden>
Date: 2010-10-26 12:41:09

* Julia Lawall [off-list ref]:
Delete successive assignments to the same location.  Initialize the out_y
field as well as the out_x field, rather than initializing the out_x field
twice.
Hi there!

An identical patch is already in the -mm tree:
The patch titled
     drivers/video/omap/blizzard.c: suspected typo in assignment
has been added to the -mm tree.  Its filename is
     video-omap-suspected-typo-in-assignment.patch
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: drivers/video/omap/blizzard.c: suspected typo in assignment
From: Nicolas Kaiser <redacted>

Untested, but looks like an obvious typo to me.

Signed-off-by: Nicolas Kaiser <redacted>
Cc: Tomi Valkeinen <redacted>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Best regards,
Nicolas Kaiser
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help