Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754549AbaDYUNM (ORCPT ); Fri, 25 Apr 2014 16:13:12 -0400 Received: from mailrelay012.isp.belgacom.be ([195.238.6.179]:50815 "EHLO mailrelay012.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751613AbaDYUNK (ORCPT ); Fri, 25 Apr 2014 16:13:10 -0400 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMVABrBWlNXQASl/2dsb2JhbABZgwarUplwAgKBExd0glMTHCMYgQIkE4hFAcpChVqIf4RAAQOOdooOAZJcgXKBQTs Date: Fri, 25 Apr 2014 22:15:11 +0200 From: Fabian Frederick To: linux-kernel Cc: Jean-Christophe Plagniol-Villard , Tomi Valkeinen , akpm Subject: [PATCH 1/1] drivers/video/fbdev/core/fbmem.c: remove positive test on unsigned values Message-Id: <20140425221511.1c8dc66551123166c7f27a9c@skynet.be> X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fb_image.dx, fb_image.dy and fbconf2bmap.framebuffer are __u32 Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: Andrew Morton Signed-off-by: Fabian Frederick --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/