Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1473623 > unrolled thread

[PATCH] video: fbdev: intelfb: remove impossible condition

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2016-08-31 17:50 +0200
Last post2016-09-07 10:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] video: fbdev: intelfb: remove impossible condition Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-08-31 17:50 +0200
    Re: [PATCH] video: fbdev: intelfb: remove impossible condition Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-09-07 10:20 +0200

#1473623 — [PATCH] video: fbdev: intelfb: remove impossible condition

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2016-08-31 17:50 +0200
Subject[PATCH] video: fbdev: intelfb: remove impossible condition
Message-ID<scfW1-4eb-15@gated-at.bofh.it>
xoffset and yoffset of struct fb_var_screeninfo are unsigned and so
they can never be less than 0.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
 drivers/video/fbdev/intelfb/intelfbdrv.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c
index bf20744..ff2a5d2 100644
--- a/drivers/video/fbdev/intelfb/intelfbdrv.c
+++ b/drivers/video/fbdev/intelfb/intelfbdrv.c
@@ -1301,11 +1301,6 @@ static int intelfb_check_var(struct fb_var_screeninfo *var,
 		break;
 	}
 
-	if (v.xoffset < 0)
-		v.xoffset = 0;
-	if (v.yoffset < 0)
-		v.yoffset = 0;
-
 	if (v.xoffset > v.xres_virtual - v.xres)
 		v.xoffset = v.xres_virtual - v.xres;
 	if (v.yoffset > v.yres_virtual - v.yres)
-- 
1.9.1

[toc] | [next] | [standalone]


#1478070

FromTomi Valkeinen <tomi.valkeinen@ti.com>
Date2016-09-07 10:20 +0200
Message-ID<seGfn-5H3-11@gated-at.bofh.it>
In reply to#1473623

[Multipart message — attachments visible in raw view] — view raw

On 31/08/16 18:44, Sudip Mukherjee wrote:
> xoffset and yoffset of struct fb_var_screeninfo are unsigned and so
> they can never be less than 0.
> 
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
>  drivers/video/fbdev/intelfb/intelfbdrv.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c
> index bf20744..ff2a5d2 100644
> --- a/drivers/video/fbdev/intelfb/intelfbdrv.c
> +++ b/drivers/video/fbdev/intelfb/intelfbdrv.c
> @@ -1301,11 +1301,6 @@ static int intelfb_check_var(struct fb_var_screeninfo *var,
>  		break;
>  	}
>  
> -	if (v.xoffset < 0)
> -		v.xoffset = 0;
> -	if (v.yoffset < 0)
> -		v.yoffset = 0;
> -
>  	if (v.xoffset > v.xres_virtual - v.xres)
>  		v.xoffset = v.xres_virtual - v.xres;
>  	if (v.yoffset > v.yres_virtual - v.yres)
> 

Thanks, queued for 4.9.

 Tomi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web