linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
	Maik Broemme <mbroemme@plusserver.de>
Cc: joe@perches.com, kernel-janitors@vger.kernel.org,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/7] video: fbdev: intelfb: delete double assignment
Date: Tue, 26 Aug 2014 10:56:13 +0000	[thread overview]
Message-ID: <53FC67CD.8020901@ti.com> (raw)
In-Reply-To: <1408818808-18850-3-git-send-email-Julia.Lawall@lip6.fr>

[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]

On 23/08/14 21:33, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> 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>
> 
> ---
> The patches in this series do not depend on each other.
> 
> This changes the behavior of the code in the second case and is not tested.

In this patch, as in the sis one, the behavior is changed. The subject
might perhaps be "fix cursor initialization"?

The patch does look like it could cause a regression, though. Anyone
able to test this?

 Tomi

> 
>  drivers/video/fbdev/intelfb/intelfbhw.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/intelfb/intelfbhw.c b/drivers/video/fbdev/intelfb/intelfbhw.c
> index fbad61d..d31ed4e 100644
> --- a/drivers/video/fbdev/intelfb/intelfbhw.c
> +++ b/drivers/video/fbdev/intelfb/intelfbhw.c
> @@ -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) |
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-08-26 10:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1408818808-18850-1-git-send-email-Julia.Lawall@lip6.fr>
2014-08-23 18:33 ` [PATCH 2/7] video: fbdev: intelfb: delete double assignment Julia Lawall
2014-08-26 10:56   ` Tomi Valkeinen [this message]
2014-08-23 18:33 ` [PATCH 6/7] video: fbdev: sis: " Julia Lawall
2014-08-24 18:21   ` Geert Uytterhoeven
2014-08-24 18:40     ` Julia Lawall
2014-08-25 11:36       ` Geert Uytterhoeven
2014-08-26 10:51     ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FC67CD.8020901@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbroemme@plusserver.de \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).