From patchwork Tue Jan 13 16:14:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5621651 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C4D61C058D for ; Tue, 13 Jan 2015 16:15:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDD6A20340 for ; Tue, 13 Jan 2015 16:15:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5819202FF for ; Tue, 13 Jan 2015 16:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751877AbbAMQPP (ORCPT ); Tue, 13 Jan 2015 11:15:15 -0500 Received: from mail-pd0-f172.google.com ([209.85.192.172]:49529 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622AbbAMQPO (ORCPT ); Tue, 13 Jan 2015 11:15:14 -0500 Received: by mail-pd0-f172.google.com with SMTP id y13so4229560pdi.3; Tue, 13 Jan 2015 08:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=phTllI/dt7LS8kdGr9+JRWFobHPrcofVA5DDGRaDDyE=; b=p2oMcFnNqYswENUsWyAirC5PlgzjjO+Vu0pQ6ziVmM3ktsLixTWh7U6eQcE8OLuEVF R783b57hUAvXUXrghoLdDDxocayHdepDWMa6q2Nko4KW3P9ljrnL7zhKTDdwnwoj5F6P KbSUvcEsXbAQzBH9DHb3LZjYReeneGfw1cc1/IOf1KqEdamtorn9x+9aoX00SuOzX0AO +BTNDe/Z2FL+9iVTZheXj97eE2638UefpNeH+zJbPGA1Evy81IHwearXZGq/qpe4h0Fs MBlUs26p0HW9J49m3tRi4vkK0QDH1O8hbyp2AwgV5t8nj4nsHf9YviWtMNMa+lXS/K35 h+0Q== X-Received: by 10.70.43.68 with SMTP id u4mr53300713pdl.6.1421165714158; Tue, 13 Jan 2015 08:15:14 -0800 (PST) Received: from localhost.localdomain ([122.169.180.146]) by mx.google.com with ESMTPSA id rg6sm17396316pbc.43.2015.01.13.08.15.10 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Jan 2015 08:15:13 -0800 (PST) From: Sudip Mukherjee To: Ferenc Bakonyi , Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Sudip Mukherjee , linux-nvidia@lists.surfsouth.com, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: hgafb: remove unneeded comparison Date: Tue, 13 Jan 2015 21:44:59 +0530 Message-Id: <1421165699-9033-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP var->yoffset is of the type __u32, hence the comparison will always be false. Signed-off-by: Sudip Mukherjee --- 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 {