linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] drivers/video/fbdev/core/fbmem.c: remove positive test on unsigned values
@ 2014-04-25 20:15 Fabian Frederick
  2014-05-09  9:54 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-04-25 20:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, akpm

fb_image.dx, fb_image.dy and fbconf2bmap.framebuffer are __u32

Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/video/fbdev/core/fbmem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index b6d5008..583896e 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -433,7 +433,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
 			image->dx += image->width + 8;
 		}
 	} else if (rotate == FB_ROTATE_UD) {
-		for (x = 0; x < num && image->dx >= 0; x++) {
+		for (x = 0; x < num; x++) {
 			info->fbops->fb_imageblit(info, image);
 			image->dx -= image->width + 8;
 		}
@@ -445,7 +445,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
 			image->dy += image->height + 8;
 		}
 	} else if (rotate == FB_ROTATE_CCW) {
-		for (x = 0; x < num && image->dy >= 0; x++) {
+		for (x = 0; x < num; x++) {
 			info->fbops->fb_imageblit(info, image);
 			image->dy -= image->height + 8;
 		}
@@ -1179,7 +1179,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
 			return -EFAULT;
 		if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
 			return -EINVAL;
-		if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
+		if (con2fb.framebuffer >= FB_MAX)
 			return -EINVAL;
 		if (!registered_fb[con2fb.framebuffer])
 			request_module("fb%d", con2fb.framebuffer);
-- 
1.8.4.5


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

* Re: [PATCH 1/1] drivers/video/fbdev/core/fbmem.c: remove positive test on unsigned values
  2014-04-25 20:15 [PATCH 1/1] drivers/video/fbdev/core/fbmem.c: remove positive test on unsigned values Fabian Frederick
@ 2014-05-09  9:54 ` Tomi Valkeinen
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2014-05-09  9:54 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel; +Cc: Jean-Christophe Plagniol-Villard, akpm

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

On 25/04/14 23:15, Fabian Frederick wrote:
> fb_image.dx, fb_image.dy and fbconf2bmap.framebuffer are __u32
> 
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  drivers/video/fbdev/core/fbmem.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
> index b6d5008..583896e 100644
> --- a/drivers/video/fbdev/core/fbmem.c
> +++ b/drivers/video/fbdev/core/fbmem.c
> @@ -433,7 +433,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
>  			image->dx += image->width + 8;
>  		}
>  	} else if (rotate == FB_ROTATE_UD) {
> -		for (x = 0; x < num && image->dx >= 0; x++) {
> +		for (x = 0; x < num; x++) {
>  			info->fbops->fb_imageblit(info, image);
>  			image->dx -= image->width + 8;
>  		}
> @@ -445,7 +445,7 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
>  			image->dy += image->height + 8;
>  		}
>  	} else if (rotate == FB_ROTATE_CCW) {
> -		for (x = 0; x < num && image->dy >= 0; x++) {
> +		for (x = 0; x < num; x++) {
>  			info->fbops->fb_imageblit(info, image);
>  			image->dy -= image->height + 8;
>  		}
> @@ -1179,7 +1179,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
>  			return -EFAULT;
>  		if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
>  			return -EINVAL;
> -		if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
> +		if (con2fb.framebuffer >= FB_MAX)
>  			return -EINVAL;
>  		if (!registered_fb[con2fb.framebuffer])
>  			request_module("fb%d", con2fb.framebuffer);
> 

Looks fine to me. Queued for 3.16.

 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:[~2014-05-09  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25 20:15 [PATCH 1/1] drivers/video/fbdev/core/fbmem.c: remove positive test on unsigned values Fabian Frederick
2014-05-09  9:54 ` 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).