From patchwork Wed Sep 25 12:02:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2941961 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 3D9989F289 for ; Wed, 25 Sep 2013 12:03:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AD6C20578 for ; Wed, 25 Sep 2013 12:03:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0906E20573 for ; Wed, 25 Sep 2013 12:03:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755213Ab3IYMDF (ORCPT ); Wed, 25 Sep 2013 08:03:05 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:48210 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754667Ab3IYMDE (ORCPT ); Wed, 25 Sep 2013 08:03:04 -0400 Received: by mail-pd0-f181.google.com with SMTP id g10so6008202pdj.12 for ; Wed, 25 Sep 2013 05:03:04 -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=xJWF3LJUENOIiXqaHNnughBs9cq3QONYSaPk6uVSPrE=; b=Oca3T7+ekh2cMn1ErMuaLSiW5bv4qFG18jlL/6EhIToONMpV6E8gBanb7kBnYUom31 Bcf36rNTA3QwjuTYjNlov9tvbVfIjvnP3Gn5U5PdMlx4cAbmT00TCv9Aw51WfW0RGg2Q nOie3r2ei317s627Ys+umL5l84FZH1PfC19hoK1ZgjZkmazCa5IodoMiX61KZ+VIppYp POqOexvUiOEqPtV6t5bih66hKm5vcQCefS5/cDYYmHZXJloy6MA9UyAy31hMpOUv2Pyi RDtVC28jBLlc06ck+M5LXVkqKttId79VZ7sirTPspUjKZQiGZhp5ffOdVc3Ac0w0+OhV SNpA== X-Gm-Message-State: ALoCoQlw8R7Qw4StYlW7AXBn5vjjaRSUYzeqI6cgTn7cIydKeF1AHI8WsrwQC3nC4u7tIOOJsafg X-Received: by 10.68.33.100 with SMTP id q4mr32686591pbi.119.1380110584425; Wed, 25 Sep 2013 05:03:04 -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:03 -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, Jeff Garzik Subject: [PATCH 2/4] video: cirrusfb: Remove incorrect checks Date: Wed, 25 Sep 2013 17:32:57 +0530 Message-Id: <1380110579-3665-2-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 Cc: Jeff Garzik --- drivers/video/cirrusfb.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index b016746..5aab9b9 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c @@ -595,11 +595,6 @@ static int cirrusfb_check_var(struct fb_var_screeninfo *var, 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;