From patchwork Sun Jul 6 18:35:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4490931 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 2BB08BEEAA for ; Sun, 6 Jul 2014 18:34:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 562582022D for ; Sun, 6 Jul 2014 18:34:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 84AEE20219 for ; Sun, 6 Jul 2014 18:34:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751960AbaGFSd7 (ORCPT ); Sun, 6 Jul 2014 14:33:59 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:45040 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751906AbaGFSd7 (ORCPT ); Sun, 6 Jul 2014 14:33:59 -0400 Received: by mail-wg0-f42.google.com with SMTP id n12so1669290wgh.25 for ; Sun, 06 Jul 2014 11:33:58 -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=+VOzBa+ddiC2/LcibfLt98bhiFi7AwNu3fWAbfuGl9A=; b=eTBtg2T3NgxKSGjHzz4iLF6izvDib/ESwUvmmszaZSYsqFeXS+2ihWkNbxFr94DrW+ eIjIHK5qOPvJaNZE8XW3V9S/yBYUSwJbXftLO2gMdUwMcdlhEYepVnIgLTuyYqZlPXpi FKa9kjLilKzRCukAMA7lY9frfD9gL50FYVfMx6NQc05MMcyoMDuQH7oYUxrSoL1Irr2x 68wQ7y7iNw3j6hCxtTx8tRFVfuNHooCHM9K4Y61Ghtez1i94sahxN4EWOFId1A0Ul063 9Q3c4iRPPsCAnun82QIdPk/8byWMuCsz9FAEKx2qSV4BbywzCPgovlqDsfjtRMkZmXZQ A4Nw== X-Gm-Message-State: ALoCoQkCVjBGMrDldgARDUC+86vVTJ150i7TTXHPwx+Nj+Lq29POGvoD9KcrP60q5F0vnjDis+7+ X-Received: by 10.180.101.98 with SMTP id ff2mr31958695wib.40.1404671638131; Sun, 06 Jul 2014 11:33:58 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id fb8sm105706044wib.15.2014.07.06.11.33.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:33:57 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: intelfb: intelfbhw.c: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:35:14 +0200 Message-Id: <1404671714-18460-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/intelfb/intelfbhw.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/intelfb/intelfbhw.c b/drivers/video/fbdev/intelfb/intelfbhw.c index fbad61d..dea89ed 100644 --- a/drivers/video/fbdev/intelfb/intelfbhw.c +++ b/drivers/video/fbdev/intelfb/intelfbhw.c @@ -937,15 +937,11 @@ static int calc_pll_params(int index, int clock, u32 *retm1, u32 *retm2, { u32 m1, m2, n, p1, p2, n1, testm; u32 f_vco, p, p_best = 0, m, f_out = 0; - u32 err_max, err_target, err_best = 10000000; - u32 n_best = 0, m_best = 0, f_best, f_err; + u32 err_best = 10000000; + u32 n_best = 0, m_best = 0, f_err; u32 p_min, p_max, p_inc, div_max; struct pll_min_max *pll = &plls[index]; - /* Accept 0.5% difference, but aim for 0.1% */ - err_max = 5 * clock / 1000; - err_target = clock / 1000; - DBG_MSG("Clock is %d\n", clock); div_max = pll->max_vco / clock; @@ -992,7 +988,6 @@ static int calc_pll_params(int index, int clock, u32 *retm1, u32 *retm2, m_best = testm; n_best = n; p_best = p; - f_best = f_out; err_best = f_err; } }