From patchwork Wed Aug 31 15:44:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 9307401 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 353CE60487 for ; Wed, 31 Aug 2016 15:45:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27A8B28EE4 for ; Wed, 31 Aug 2016 15:45:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AD8528F8A; Wed, 31 Aug 2016 15:45:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A853328EE4 for ; Wed, 31 Aug 2016 15:45:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965043AbcHaPpD (ORCPT ); Wed, 31 Aug 2016 11:45:03 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33533 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964957AbcHaPpC (ORCPT ); Wed, 31 Aug 2016 11:45:02 -0400 Received: by mail-pf0-f195.google.com with SMTP id i6so2944524pfe.0; Wed, 31 Aug 2016 08:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=hs2NNS//Ur1ME9HS2sEFk5MsnLpr+cvnLsXy09EKBQU=; b=wGvSFOzsH+ylq6/lkqK2m9z5e1mVrg0zgB+v4CVFE5/BWIGg0MD/ovEB0PnjDrHTgT ixS5HZJf1jFAZLVdImq0dZs1C3RKavzzXy/28+497RBoDx989Te/a1uQb8L5JH4Vbbed Rj56y/7se5OxYc3E4UFm5z+UCgVYXOSWZEtBNUiY3T2Zkp97YOihm9LTd8s5jkH2nVWF MgnYrv655aZ1zgHgcr2uUXptVvayJSjt4MXI5wxn8vTjIDqzBVsfu+Umk6PXgd9q2tYN b52suC1rKwoBW7Crvf6KjTtPyI/Y1tSNrgIe9Ia1b9GwJ6KWJQNDnGqBJaeFpTJq39v0 jSrw== 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; bh=hs2NNS//Ur1ME9HS2sEFk5MsnLpr+cvnLsXy09EKBQU=; b=S1PPtYyN1osx14/C8DVJrmbm0YPQQ9YT2XdIeBH2qVdVejpPIa9/ZAa3wOwf9/cnX/ 1V2Bg6vmrna8Kbe4AodQng6F32SC0FsnnNRb1FHLGZFQLl1iMBxlrH4oddSz4gDJxVc2 uGRASFgU0RpomGnRj05IYSbj+GHCrTosmMbI7Z6KUJI/Yp38a/9rwz6xCTIcN9qElahY Ay0HomGmOjKhb7hzJlY5NYBB790CsATBK82al+aG2244OaxRwalqAPBIY4gIwbZ5kQw6 /0MLA7OtIUTsML9nxdJcWMmnRS+09bfDSdWu/mh6G5VLG4LDBDOV34IZvYNCBpd2UELW 0ZKg== X-Gm-Message-State: AE9vXwNFXI3scFWJSKZyC2WgYHLGSafgFTbhar6y+VtWz/P2zuq/bf2OufeTGIGoLu/p2g== X-Received: by 10.98.216.199 with SMTP id e190mr17981169pfg.123.1472658286113; Wed, 31 Aug 2016 08:44:46 -0700 (PDT) Received: from localhost.localdomain ([103.24.124.194]) by smtp.gmail.com with ESMTPSA id g27sm648208pfd.47.2016.08.31.08.44.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Aug 2016 08:44:45 -0700 (PDT) From: Sudip Mukherjee To: Maik Broemme , Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, Sudip Mukherjee Subject: [PATCH] video: fbdev: intelfb: remove impossible condition Date: Wed, 31 Aug 2016 21:14:29 +0530 Message-Id: <1472658269-1234-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP xoffset and yoffset of struct fb_var_screeninfo are unsigned and so they can never be less than 0. Signed-off-by: Sudip Mukherjee --- drivers/video/fbdev/intelfb/intelfbdrv.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c index bf20744..ff2a5d2 100644 --- a/drivers/video/fbdev/intelfb/intelfbdrv.c +++ b/drivers/video/fbdev/intelfb/intelfbdrv.c @@ -1301,11 +1301,6 @@ static int intelfb_check_var(struct fb_var_screeninfo *var, break; } - if (v.xoffset < 0) - v.xoffset = 0; - if (v.yoffset < 0) - v.yoffset = 0; - if (v.xoffset > v.xres_virtual - v.xres) v.xoffset = v.xres_virtual - v.xres; if (v.yoffset > v.yres_virtual - v.yres)