From patchwork Sat Jul 5 12:13:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4487481 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 863279F26C for ; Sat, 5 Jul 2014 12:12:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C76C20357 for ; Sat, 5 Jul 2014 12:12:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B6EC202E9 for ; Sat, 5 Jul 2014 12:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755250AbaGEML7 (ORCPT ); Sat, 5 Jul 2014 08:11:59 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:56172 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951AbaGEML6 (ORCPT ); Sat, 5 Jul 2014 08:11:58 -0400 Received: by mail-wg0-f52.google.com with SMTP id b13so2494653wgh.11 for ; Sat, 05 Jul 2014 05:11:57 -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=mO4AzXmvziW8zW4O0bwFLT+CnZYg8xl1LcIu/pbFSDs=; b=VUH5c3oE8aVLhTBl7ISYqZyGpj9sfHmqnAFARCS3g4NKfSHRSy9x0YiE5fYUPMFwNb Iu+oNcKHJqEkWzrEjqSGlIJ+oI53BeJ8HNZORknLPBnkr+aty7PT8Xj+N+Nx5v3IsmMy lb4TJtaxHXwcW/otWmlyC6e9IvsgbYUd8ddmIxwLL3jlDqmLyoGwL1ww1oKzJy8Ng+WO nztfxIi6DiQc6D1mV/OdUCn427cwO65eZq04MByaZ8ikyrMlAXV96l5goHpWYi+3trlO fpiKVtgQ7ggk8Api+ISPWvCvWY4y3o5ZdcuhXwxy/49I3tRgK1AnG3yXIew/pro1UwTn Mm7g== X-Gm-Message-State: ALoCoQkPQXvNGI9FUGgS4Wj6zoFUDDcAom9yCkifKW+jI3CnP8RqyxfnK6uIbsLdeV5koeF3vg2O X-Received: by 10.180.20.15 with SMTP id j15mr63918831wie.60.1404562317069; Sat, 05 Jul 2014 05:11:57 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id ex4sm90519328wic.2.2014.07.05.05.11.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:11:56 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , 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: Sat, 5 Jul 2014 14:13:13 +0200 Message-Id: <1404562393-18641-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 Acked-by: Geert Uytterhoeven --- 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;