[PATCH 6/7] video: fbdev: sis: delete double assignment

Subsystems: framebuffer layer, sis framebuffer driver, the rest

STALE4370d

5 messages, 3 authors, 2014-08-26 · open the first message on its own page

[PATCH 6/7] video: fbdev: sis: delete double assignment

From: Julia Lawall <hidden>
Date: 2014-08-23 18:37:27

From: Julia Lawall <redacted>

Delete successive assignments to the same location.  The second assignment
is changed to update a different field, as done in other nearby code.

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>

---
The patches in this series do not depend on each other.

This changes the semantics of the code and is not tested.

 drivers/video/fbdev/sis/init301.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c
index a89e3ca..295e0de 100644
--- a/drivers/video/fbdev/sis/init301.c
+++ b/drivers/video/fbdev/sis/init301.c
@@ -1714,7 +1714,7 @@ SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned sh
 			       SiS_Pr->PanelVCLKIdx315 = VCLK81_315; /* ? */
 			    } else {
 			       SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   =  802;
-			       SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRS  =  112;
+			       SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRE  =  112;
 			       SiS_Pr->PanelVRS  =    3; SiS_Pr->PanelVRE  =    6;
 			       SiS_Pr->PanelVCLKIdx300 = VCLK81_300;
 			       SiS_Pr->PanelVCLKIdx315 = VCLK81_315;

Re: [PATCH 6/7] video: fbdev: sis: delete double assignment

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2014-08-24 18:21:50

On Sat, Aug 23, 2014 at 8:33 PM, Julia Lawall [off-list ref] wrote:
---
The patches in this series do not depend on each other.

This changes the semantics of the code and is not tested.
Hence I think you should change the subject of the patch, so it's obvious
some bug is fixed, e.g. "video: fbdev: sis: Fix double assignment".
quoted hunk
 drivers/video/fbdev/sis/init301.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c
index a89e3ca..295e0de 100644
--- a/drivers/video/fbdev/sis/init301.c
+++ b/drivers/video/fbdev/sis/init301.c
@@ -1714,7 +1714,7 @@ SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned sh
                               SiS_Pr->PanelVCLKIdx315 = VCLK81_315; /* ? */
                            } else {
                               SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   =  802;
-                              SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRS  =  112;
+                              SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRE  =  112;
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Re: [PATCH 6/7] video: fbdev: sis: delete double assignment

From: Julia Lawall <hidden>
Date: 2014-08-24 18:40:56

On Sun, 24 Aug 2014, Geert Uytterhoeven wrote:
On Sat, Aug 23, 2014 at 8:33 PM, Julia Lawall [off-list ref] wrote:
quoted
---
The patches in this series do not depend on each other.

This changes the semantics of the code and is not tested.
Hence I think you should change the subject of the patch, so it's obvious
some bug is fixed, e.g. "video: fbdev: sis: Fix double assignment".
Do you want me to resend this patch with the new subject, or just keep it 
in mind for the future?

thanks,
julia
quoted
 drivers/video/fbdev/sis/init301.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c
index a89e3ca..295e0de 100644
--- a/drivers/video/fbdev/sis/init301.c
+++ b/drivers/video/fbdev/sis/init301.c
@@ -1714,7 +1714,7 @@ SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned sh
                               SiS_Pr->PanelVCLKIdx315 = VCLK81_315; /* ? */
                            } else {
                               SiS_Pr->PanelHT   = 1688; SiS_Pr->PanelVT   =  802;
-                              SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRS  =  112;
+                              SiS_Pr->PanelHRS  =   48; SiS_Pr->PanelHRE  =  112;
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH 6/7] video: fbdev: sis: delete double assignment

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2014-08-25 11:36:45

Hi Julia,

On Sun, Aug 24, 2014 at 8:40 PM, Julia Lawall [off-list ref] wrote:
quoted
On Sat, Aug 23, 2014 at 8:33 PM, Julia Lawall [off-list ref] wrote:
quoted
---
The patches in this series do not depend on each other.

This changes the semantics of the code and is not tested.
Hence I think you should change the subject of the patch, so it's obvious
some bug is fixed, e.g. "video: fbdev: sis: Fix double assignment".
Do you want me to resend this patch with the new subject, or just keep it
in mind for the future?
That's up to the fbdev maintainer.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Re: [PATCH 6/7] video: fbdev: sis: delete double assignment

From: Tomi Valkeinen <hidden>
Date: 2014-08-26 10:52:14

On 24/08/14 21:21, Geert Uytterhoeven wrote:
On Sat, Aug 23, 2014 at 8:33 PM, Julia Lawall [off-list ref] wrote:
quoted
---
The patches in this series do not depend on each other.

This changes the semantics of the code and is not tested.
Hence I think you should change the subject of the patch, so it's obvious
some bug is fixed, e.g. "video: fbdev: sis: Fix double assignment".
Well, to me "fix double assignment" sounds the same as "delete double
assignment".

Looking at the code, I think what's done here is "fix 1280x768 panel
timings".

I can apply this and do the change to subject, if nobody complains.

 Tomi

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help