From patchwork Sun Jul 6 18:26:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4490581 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 6D37EBEEAA for ; Sun, 6 Jul 2014 18:25:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 942D4202E6 for ; Sun, 6 Jul 2014 18:25:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C82632022D for ; Sun, 6 Jul 2014 18:25:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751968AbaGFSZn (ORCPT ); Sun, 6 Jul 2014 14:25:43 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:42109 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbaGFSZm (ORCPT ); Sun, 6 Jul 2014 14:25:42 -0400 Received: by mail-wi0-f173.google.com with SMTP id cc10so14793993wib.12 for ; Sun, 06 Jul 2014 11:25:41 -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=8jTPE3/TkbsVPcn0EeTf6FoMmi2dIQD8rsUi4CeOdcg=; b=JWgGe/+xc/ZJCFGLgKIW7kqH5XbmNTNAeYvALDm5otq13goiAKEN5k8nLwjW/9j7QX tjTC0pYafyn+dDdVkjLxSlg+cD+/+m21o1uTljIxfl11tXGc/Ybt0HCfdCBaXtPAz42p RnMvfhtvcR+Yta3fiWxSYCrdL9PCyY9RwZ1FVge7Klae5UtopF75GhnlF0CPmii3WZn/ 4vugWOOlSnaAhqRG2UYBKVMjRhkPTD1EXzCoBBrIrdKWQ3IP+ggtwPv8+WZxx0VJMDx8 QJ9npHVEJVXxFDwYj4wZFd1SEWBIEDetuDy4MpV1GDyz9ru5+mLT5KJ/3t+4yhXGFQib DvQA== X-Gm-Message-State: ALoCoQlvGuRAYBiVi87o2ZCfsvkAYiwk/kCfyMGk0LeQSxEbQMZXxCnjZ4kQTUvJgC2XRfXaKyjC X-Received: by 10.194.89.138 with SMTP id bo10mr26916710wjb.22.1404671141291; Sun, 06 Jul 2014 11:25:41 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id cx5sm84037941wjb.8.2014.07.06.11.25.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:25:40 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Grant Likely , Rob Herring , Jingoo Han , Daniel Vetter , Laurent Pinchart , Sachin Kamat , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH] video: fbdev: aty: radeon_base.c: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:26:57 +0200 Message-Id: <1404671217-17772-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/aty/radeon_base.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 26d80a4..aee65ba 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -1532,14 +1532,14 @@ static int radeonfb_set_par(struct fb_info *info) struct fb_var_screeninfo *mode = &info->var; struct radeon_regs *newmode; int hTotal, vTotal, hSyncStart, hSyncEnd, - hSyncPol, vSyncStart, vSyncEnd, vSyncPol, cSync; + vSyncStart, vSyncEnd; u8 hsync_adj_tab[] = {0, 0x12, 9, 9, 6, 5}; u8 hsync_fudge_fp[] = {2, 2, 0, 0, 5, 5}; u32 sync, h_sync_pol, v_sync_pol, dotClock, pixClock; int i, freq; int format = 0; int nopllcalc = 0; - int hsync_start, hsync_fudge, bytpp, hsync_wid, vsync_wid; + int hsync_start, hsync_fudge, hsync_wid, vsync_wid; int primary_mon = PRIMARY_MONITOR(rinfo); int depth = var_to_depth(mode); int use_rmx = 0; @@ -1612,13 +1612,7 @@ static int radeonfb_set_par(struct fb_info *info) else if (vsync_wid > 0x1f) /* max */ vsync_wid = 0x1f; - hSyncPol = mode->sync & FB_SYNC_HOR_HIGH_ACT ? 0 : 1; - vSyncPol = mode->sync & FB_SYNC_VERT_HIGH_ACT ? 0 : 1; - - cSync = mode->sync & FB_SYNC_COMP_HIGH_ACT ? (1 << 4) : 0; - format = radeon_get_dstbpp(depth); - bytpp = mode->bits_per_pixel >> 3; if ((primary_mon == MT_DFP) || (primary_mon == MT_LCD)) hsync_fudge = hsync_fudge_fp[format-1];