From patchwork Sat Jul 5 12:17:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4487561 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 CD9AFBEEAA for ; Sat, 5 Jul 2014 12:16:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC9EA20357 for ; Sat, 5 Jul 2014 12:16:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 157752039D for ; Sat, 5 Jul 2014 12:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755581AbaGEMQH (ORCPT ); Sat, 5 Jul 2014 08:16:07 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:39742 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754247AbaGEMQG (ORCPT ); Sat, 5 Jul 2014 08:16:06 -0400 Received: by mail-wg0-f49.google.com with SMTP id y10so2541402wgg.20 for ; Sat, 05 Jul 2014 05:16:04 -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=nkkMZWo9Rox5Vb2lq3//TNwiqXuv0NHkYINADahi3I0=; b=RcvdRLQBfbmxNLxgn72i63XeeiGJh/5dqkUJO3d+e0WeKLf90P2O85hXgNghEBxegS pP58gdiWrsDMQqF9pmAM+lKnLYU9ZvVwj5oKg8Rq90xoldhkCps/385AkpFnQtqhYqps xQPH6mXqToDZk5JWgfvvTBOfvnhpy3wpEvqMGbkcaH6klEAHAEP7V7VOtWaaps0Kytqp H5BpjYq6Z7pYfvI0yyxNg0UewMA8TBzFzYVuk3utwZqnQBO1FkXZ+pwWIVKIjnDU1hye 5NWnlHH+gDdce2B8M1q8BhU+BzjD+9aJQY3bvnnqKpIHVu0oRE1zevJTfTZW+c5DRH4o z6QQ== X-Gm-Message-State: ALoCoQmAmEgEHgdE7HuHJ3QRuZjoq/0s5DIaA0vrCbcZCmKw+UQ0Djs0aZNWP4KO1tglVNWmQS9+ X-Received: by 10.180.72.38 with SMTP id a6mr63939978wiv.29.1404562564602; Sat, 05 Jul 2014 05:16:04 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id hi2sm75413838wjb.29.2014.07.05.05.16.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:16:03 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Rickard Strandqvist , Grant Likely , Rob Herring , Jingoo Han , Daniel Vetter , Laurent Pinchart , Rob Clark , 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: Sat, 5 Jul 2014 14:17:21 +0200 Message-Id: <1404562641-19081-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/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];