From patchwork Sat Jul 5 12:34:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4487961 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 815E39F358 for ; Sat, 5 Jul 2014 12:33:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6A5C20357 for ; Sat, 5 Jul 2014 12:33:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E897E202A1 for ; Sat, 5 Jul 2014 12:33:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755141AbaGEMdd (ORCPT ); Sat, 5 Jul 2014 08:33:33 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:57687 "EHLO mail-we0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbaGEMdc (ORCPT ); Sat, 5 Jul 2014 08:33:32 -0400 Received: by mail-we0-f169.google.com with SMTP id t60so2573379wes.0 for ; Sat, 05 Jul 2014 05:33:31 -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=SmGEslQ5ouPD2CaFdoP5iM+kXrPhUH9Di5D23M+PCuU=; b=HFoWBl71fJkg9Pb1X76kGA9YHCeoBqrKk7oCiic+rcMvXL02uyw6rylxozUDMKBaxx 9gPKNyC9jryXK32yWRyyqyDx38NX1OJTix6v+gOm+Uxvt8mBsy9UbDVUGnt3PYlqFCyg Jr40HH+o2CyO9tvmVvS3sWFJuFlrEs47Yo3U6BbM582Ah+gouWReclpdMCNoghETiJPH Hbr+3aJWy5vM7Gfkn0n4sV6w9md5K3u2XEPwKwwCJar43aMFDLRuzvvHAdwZ8Z77QBps p+98NLi+Y5t2eoXKqy7QZ3KH31JFZyr/TttYqDC4ofPs9XsbqdNMhVdUCDELocJnPXoA cROQ== X-Gm-Message-State: ALoCoQnXxSCfJ76XZnWyIRpUdYi0FJvkcREo6+7S4HYJ/7hdKwbkzHwalO0nXQfgESQFr+iNg6pu X-Received: by 10.180.96.97 with SMTP id dr1mr63867206wib.19.1404563611665; Sat, 05 Jul 2014 05:33:31 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id by3sm56217173wjc.10.2014.07.05.05.33.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:33:30 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , 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: Sat, 5 Jul 2014 14:34:48 +0200 Message-Id: <1404563688-20603-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=-6.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 From: Rickard Strandqvist 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;