LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] video: hgafb: remove unneeded comparison
@ 2015-01-13 16:14 Sudip Mukherjee
  2015-01-26 12:43 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2015-01-13 16:14 UTC (permalink / raw)
  To: Ferenc Bakonyi, Jean-Christophe Plagniol-Villard, Tomi Valkeinen
  Cc: Sudip Mukherjee, linux-nvidia, linux-fbdev, linux-kernel

var->yoffset is of the type __u32, hence the comparison will always
be false.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/video/fbdev/hgafb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c
index 5ff9fe2..15d3ccf 100644
--- a/drivers/video/fbdev/hgafb.c
+++ b/drivers/video/fbdev/hgafb.c
@@ -417,8 +417,7 @@ static int hgafb_pan_display(struct fb_var_screeninfo *var,
 			     struct fb_info *info)
 {
 	if (var->vmode & FB_VMODE_YWRAP) {
-		if (var->yoffset < 0 || 
-		    var->yoffset >= info->var.yres_virtual ||
+		if (var->yoffset >= info->var.yres_virtual ||
 		    var->xoffset)
 			return -EINVAL;
 	} else {
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] video: hgafb: remove unneeded comparison
  2015-01-13 16:14 [PATCH] video: hgafb: remove unneeded comparison Sudip Mukherjee
@ 2015-01-26 12:43 ` Tomi Valkeinen
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2015-01-26 12:43 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Ferenc Bakonyi, Jean-Christophe Plagniol-Villard, linux-nvidia,
	linux-fbdev, linux-kernel

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

On 13/01/15 18:14, Sudip Mukherjee wrote:
> var->yoffset is of the type __u32, hence the comparison will always
> be false.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>  drivers/video/fbdev/hgafb.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c
> index 5ff9fe2..15d3ccf 100644
> --- a/drivers/video/fbdev/hgafb.c
> +++ b/drivers/video/fbdev/hgafb.c
> @@ -417,8 +417,7 @@ static int hgafb_pan_display(struct fb_var_screeninfo *var,
>  			     struct fb_info *info)
>  {
>  	if (var->vmode & FB_VMODE_YWRAP) {
> -		if (var->yoffset < 0 || 
> -		    var->yoffset >= info->var.yres_virtual ||
> +		if (var->yoffset >= info->var.yres_virtual ||
>  		    var->xoffset)
>  			return -EINVAL;
>  	} else {
> 

Thanks, queued for 3.20.

 Tomi



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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-26 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-13 16:14 [PATCH] video: hgafb: remove unneeded comparison Sudip Mukherjee
2015-01-26 12:43 ` Tomi Valkeinen

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).