From patchwork Sat Jul 5 12:25:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4487771 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 86EC0BEEAA for ; Sat, 5 Jul 2014 12:24:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB0BC20357 for ; Sat, 5 Jul 2014 12:24:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DBAA820263 for ; Sat, 5 Jul 2014 12:24:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752486AbaGEMXv (ORCPT ); Sat, 5 Jul 2014 08:23:51 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:43494 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbaGEMXv (ORCPT ); Sat, 5 Jul 2014 08:23:51 -0400 Received: by mail-wg0-f49.google.com with SMTP id y10so2524851wgg.8 for ; Sat, 05 Jul 2014 05:23:49 -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=bCtdjmH/F6+q2CA3I9QXq6627Fz0xVJ2aOKzC+3KHdc=; b=BP5UCNxDK0EZxH7FsCLnQSH4346zVQ+xJFPNfcSJYvwjQGD+d5jM2lF7hJDy8Vfbq4 nvDst4yk9JRZst+UlNfdh3o0ypr+XwYYyF3BmJwDeb5Lv5AFh8MLHp3dpjWXFcvVgNhz /x81jPqMhdMzInM992O+8TnUgLM8/nuOyqy9/0sKmO5+0B2sOcRJ30p1A8NfGx+CCShT rAhMjmTBuvPQky/43Nz1OJmZ2LTEOUVARcX5mpmIyR1yY+8q2P7bUlOwNSf9HDwb2NY/ OQO6n/HcSxyO/Z40V1pFJx03XD0j6t928QNbwQoJS3bwsUIc9HeO28GwffpuXkdU5mTV 4tvg== X-Gm-Message-State: ALoCoQn0y4bk7t7atjV+6Ubi8CAKf81KIdTNFZFoAikY5s7b1ZGOScWUgciO/F9IV46J33ZtmyzL X-Received: by 10.180.83.105 with SMTP id p9mr62588813wiy.8.1404563029810; Sat, 05 Jul 2014 05:23:49 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id gh16sm90631933wic.3.2014.07.05.05.23.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:23:49 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , Daniel Vetter , 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: Sat, 5 Jul 2014 14:25:06 +0200 Message-Id: <1404563106-19774-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/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; } }