From patchwork Sun Jul 6 18:45:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4491191 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DD101BEEAA for ; Sun, 6 Jul 2014 18:44:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E8A520253 for ; Sun, 6 Jul 2014 18:44:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 434A62024C for ; Sun, 6 Jul 2014 18:44:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148AbaGFSoT (ORCPT ); Sun, 6 Jul 2014 14:44:19 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:39913 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751752AbaGFSoT (ORCPT ); Sun, 6 Jul 2014 14:44:19 -0400 Received: by mail-wi0-f178.google.com with SMTP id n15so5680703wiw.5 for ; Sun, 06 Jul 2014 11:44:18 -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; bh=T36rcGwLH0axAGp5aLScjIdhzSYzB0ZDcNBQlJbwr/I=; b=MNNMkywUlL2DJHjRifBYVmph+CKv0aqsXqO1MdSMKbaKDWea1WMy82Bh8IkuaVCkKM XNaGvQhUOMfeX1oXhRHJ4y+mPBHK3vVXCmrLbQARSJTI5VqWl0BEyg7Brrq7qhebM+1O KAg/TTxwurVYuPogGRYgopaZmeeZPOw5jS20FMCjva8n73kH60JWisEzfMHoJeCs1e+H Vhz3m8u+2olYVBb7SKsyTBGwJ+Y09CT70q3BLotTTzgO75ulrsErrqgeBzMMlVy1+vi2 +cmom6FtscS+ATmjrv5yrNSgxnYv4NGO4Iyy65chfK+aGXCBEByIund77Bhicv9nAFf9 zV2g== X-Gm-Message-State: ALoCoQkRwIr6OdDgqagTblnLKENSloSim1RpLHBcvbE+0usWEWUWbsQ/6JMUKdh99uV8PyZM4vfU X-Received: by 10.180.211.71 with SMTP id na7mr25401535wic.55.1404672258039; Sun, 06 Jul 2014 11:44:18 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id lk7sm84118030wjb.24.2014.07.06.11.44.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:44:17 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Daniel Vetter , Wei Yongjun , Joe Perches , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: neofb.c: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:45:34 +0200 Message-Id: <1404672334-19313-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.6 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 Variable ar assigned a value that is never used. I have also removed all the code that thereby serves no purpose. This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/neofb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/video/fbdev/neofb.c b/drivers/video/fbdev/neofb.c index 44f99a6..b1779ae 100644 --- a/drivers/video/fbdev/neofb.c +++ b/drivers/video/fbdev/neofb.c @@ -701,8 +701,6 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) if (memlen > vramlen) { var->yres_virtual = vramlen * 8 / (var->xres_virtual * var->bits_per_pixel); - memlen = var->xres_virtual * var->bits_per_pixel * - var->yres_virtual / 8; } /* we must round yres/xres down, we already rounded y/xres_virtual up @@ -1855,7 +1853,6 @@ static int neo_init_hw(struct fb_info *info) struct neofb_par *par = info->par; int videoRam = 896; int maxClock = 65000; - int CursorMem = 1024; int CursorOff = 0x100; DBG("neo_init_hw"); @@ -1907,19 +1904,16 @@ static int neo_init_hw(struct fb_info *info) case FB_ACCEL_NEOMAGIC_NM2070: case FB_ACCEL_NEOMAGIC_NM2090: case FB_ACCEL_NEOMAGIC_NM2093: - CursorMem = 2048; CursorOff = 0x100; break; case FB_ACCEL_NEOMAGIC_NM2097: case FB_ACCEL_NEOMAGIC_NM2160: - CursorMem = 1024; CursorOff = 0x100; break; case FB_ACCEL_NEOMAGIC_NM2200: case FB_ACCEL_NEOMAGIC_NM2230: case FB_ACCEL_NEOMAGIC_NM2360: case FB_ACCEL_NEOMAGIC_NM2380: - CursorMem = 1024; CursorOff = 0x1000; par->neo2200 = (Neo2200 __iomem *) par->mmio_vbase;