From patchwork Wed Sep 25 12:02:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2941981 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5F99B9F289 for ; Wed, 25 Sep 2013 12:03:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D6C6E20578 for ; Wed, 25 Sep 2013 12:03:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D06F20573 for ; Wed, 25 Sep 2013 12:03:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755219Ab3IYMDL (ORCPT ); Wed, 25 Sep 2013 08:03:11 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:64894 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754667Ab3IYMDL (ORCPT ); Wed, 25 Sep 2013 08:03:11 -0400 Received: by mail-pb0-f52.google.com with SMTP id wz12so5888442pbc.25 for ; Wed, 25 Sep 2013 05:03:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vO4Bj4o8rtQiBe0QvlnyLgBH88h9IzprEIupRnk05No=; b=N6taWJEO78T9Aef3c1TmcjG7H+7Nx1gNpzMOEvmW/ykcRMN9H5p/516YYyDYJf9v5l Vw37IhIdvcRjSeMQjjhWl7G1t2FO7N51v6p4J0o8i53aXjsU1qn71ppTyhT/wt881HIo 2HXW5PA8yPNqMWGrIPI74jOhHus7Zxp/GzR+GS7g8sbD+VnYomHEW9zj4JdWdaZV5EFf GRfUC1yVM/JFZZdCs32f0EDVIUO1uqoyMPXjeMG4MfC7hO3X//eN9iNUDECaFwIpQzIg J2E8bJmA6dynr9LGJHuTpjgq9vtJF6l98G97nSIUiK/UWWAmEKpGw4tfu70l2Q+GM2m4 JtYg== X-Gm-Message-State: ALoCoQnCrWNR8IetKGEBoWKjnXQYeb5Sd5tXY8kuhdoAAoJOaCLHmdYBqD7gMFqRVDwDwqM60/KO X-Received: by 10.68.1.163 with SMTP id 3mr2816818pbn.94.1380110590617; Wed, 25 Sep 2013 05:03:10 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id tz3sm47246890pbc.20.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Sep 2013 05:03:10 -0700 (PDT) From: Sachin Kamat To: linux-fbdev@vger.kernel.org Cc: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, adaplas@gmail.com, benh@kernel.crashing.org, sachin.kamat@linaro.org Subject: [PATCH 4/4] video: riva: Remove incorrect checks Date: Wed, 25 Sep 2013 17:32:59 +0530 Message-Id: <1380110579-3665-4-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380110579-3665-1-git-send-email-sachin.kamat@linaro.org> References: <1380110579-3665-1-git-send-email-sachin.kamat@linaro.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 'xoffset' and 'yoffset' are unsigned and hence cannot be less than 0. Signed-off-by: Sachin Kamat --- drivers/video/riva/fbdev.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 9536715..a5514ac 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c @@ -1185,11 +1185,6 @@ static int rivafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) if (rivafb_do_maximize(info, var, nom, den) < 0) return -EINVAL; - if (var->xoffset < 0) - var->xoffset = 0; - if (var->yoffset < 0) - var->yoffset = 0; - /* truncate xoffset and yoffset to maximum if too high */ if (var->xoffset > var->xres_virtual - var->xres) var->xoffset = var->xres_virtual - var->xres - 1;