From patchwork Sun Jul 6 18:22: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: 4490491 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 AF1B89F36A for ; Sun, 6 Jul 2014 18:21:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3BF52021A for ; Sun, 6 Jul 2014 18:21:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E23B201ED for ; Sun, 6 Jul 2014 18:21:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbaGFSVe (ORCPT ); Sun, 6 Jul 2014 14:21:34 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:35969 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751664AbaGFSVd (ORCPT ); Sun, 6 Jul 2014 14:21:33 -0400 Received: by mail-wi0-f174.google.com with SMTP id bs8so14792230wib.7 for ; Sun, 06 Jul 2014 11:21:32 -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=MxgMsvVS299aCRn3/JL3cv42VvERW4hnEjPWOQHOB7g=; b=kDX9wwBGFXsI9vpYNgSDhwQEaGjGjOLk0tBs1IvCQEN06Qh7g1G1BujSy2Fihuw2QH npA/wPJXqSbfpIeYX4MZ63y0qWq+X0VUqZLKxJkedIsqyoRCpgzEqYhZVg6FgwXLKTua kiHhRtJpolzeDZguKjOgYU6if0rP1SxhJFfdGmBCNiDQ9VvOG35f96ANwVisbzedHQsn w8zBnyETqDWhAqbcOfVhRwB04RZ+le2L9RfH2nMjLmL5GoH86E9PZv60j3NrUvZoZVZG JGbV3KnSD9K/8xcIAJc2BFSgD/yQGCh2fiBqR/8yDWWVBTNMNrOSue6xPiUAi0MqhMS6 KHhQ== X-Gm-Message-State: ALoCoQkydvdedMP7pqCO2oRojJzdrJ9iH7KEBYEE5MBJc19snYdAZVgAsk2Oc256pViGbOOjnfS0 X-Received: by 10.180.182.131 with SMTP id ee3mr43770977wic.37.1404670892761; Sun, 06 Jul 2014 11:21:32 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id o3sm105567022wiz.24.2014.07.06.11.21.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:21:31 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Geert Uytterhoeven , Jingoo Han , Daniel Vetter , Joe Perches , Sachin Kamat , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: amifb.c: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:22:48 +0200 Message-Id: <1404670968-17420-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/amifb.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/video/fbdev/amifb.c b/drivers/video/fbdev/amifb.c index 518f790..19ed1fa 100644 --- a/drivers/video/fbdev/amifb.c +++ b/drivers/video/fbdev/amifb.c @@ -1124,7 +1124,6 @@ static int ami_decode_var(struct fb_var_screeninfo *var, struct amifb_par *par, { u_short clk_shift, line_shift; u_long maxfetchstop, fstrt, fsize, fconst, xres_n, yres_n; - u_int htotal, vtotal; /* * Find a matching Pixel Clock @@ -1270,8 +1269,6 @@ static int ami_decode_var(struct fb_var_screeninfo *var, struct amifb_par *par, DPRINTK("diwstrt_v too low for pal\n"); return -EINVAL; } - htotal = PAL_HTOTAL>>clk_shift; - vtotal = PAL_VTOTAL>>1; if (!IS_OCS) { par->beamcon0 = BMC0_PAL; par->bplcon3 |= BPC3_BRDRBLNK; @@ -1300,8 +1297,6 @@ static int ami_decode_var(struct fb_var_screeninfo *var, struct amifb_par *par, DPRINTK("diwstrt_v too low for ntsc\n"); return -EINVAL; } - htotal = NTSC_HTOTAL>>clk_shift; - vtotal = NTSC_VTOTAL>>1; if (!IS_OCS) { par->beamcon0 = 0; par->bplcon3 |= BPC3_BRDRBLNK; @@ -1360,8 +1355,6 @@ static int ami_decode_var(struct fb_var_screeninfo *var, struct amifb_par *par, par->beamcon0 |= BMC0_VSYTRUE; if (var->sync & FB_SYNC_COMP_HIGH_ACT) par->beamcon0 |= BMC0_CSYTRUE; - htotal = par->htotal>>clk_shift; - vtotal = par->vtotal>>1; } else { DPRINTK("only broadcast modes possible for ocs\n"); return -EINVAL; @@ -1847,10 +1840,9 @@ static int ami_get_var_cursorinfo(struct fb_var_cursorinfo *var, register short delta; register u_char color; short height, width, bits, words; - int size, alloc; + int size; size = par->crsr.height * par->crsr.width; - alloc = var->height * var->width; var->height = par->crsr.height; var->width = par->crsr.width; var->xspot = par->crsr.spot_x;