From patchwork Sat Oct 3 11:16:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7320701 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E72369F32B for ; Sat, 3 Oct 2015 11:16:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B52BF20845 for ; Sat, 3 Oct 2015 11:16:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E76D20652 for ; Sat, 3 Oct 2015 11:16:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752022AbbJCLQn (ORCPT ); Sat, 3 Oct 2015 07:16:43 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36538 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752002AbbJCLQm (ORCPT ); Sat, 3 Oct 2015 07:16:42 -0400 Received: by pablk4 with SMTP id lk4so129396305pab.3; Sat, 03 Oct 2015 04:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Vh96vFT+HEtWsPVpjBIqHKD/g1x7hnUwGqoCbDZ/XKE=; b=g/Dy/IwR0rhI9/YVeRV99PqHqsk082XZQAq3ai8E/ZHkueALXBwvNi7gyPkUdzYva1 7H6vsYBEhUTK3nvvQ+A+uwUr4KOHvS1VLVYyYuH8/BhapqJ9j0FTUO6zF7n1aCieSo6t 1ILj6D97yZOQ5iDaBAnEyh3j8oKRJB32MyryYrYMPTJlQsK7HLs6EBeMs96UQSFe1B4m X2vaVsk6mmF55wzzIj04oY6y8+/sw5hzCIbA66RbaT/kQmx08BP6D8gJQe50HIVDswsi V6XY2cNiR6pY9c0RNkbbPtJ7ZkONFR4mzr0UJlfHp2DavMqefB/ptkuLA4KQAQlGzKf3 LnKQ== X-Received: by 10.68.98.34 with SMTP id ef2mr26193531pbb.45.1443871001520; Sat, 03 Oct 2015 04:16:41 -0700 (PDT) Received: from localhost.localdomain ([122.175.61.48]) by smtp.gmail.com with ESMTPSA id o3sm17038119pap.37.2015.10.03.04.16.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Oct 2015 04:16:40 -0700 (PDT) From: Sudip Mukherjee To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, Sudip Mukherjee Subject: [PATCH] drivers/video/fbdev/i740fb: remove unused variable Date: Sat, 3 Oct 2015 16:46:31 +0530 Message-Id: <1443870991-10836-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 The value of d_best is always 0 and never changes. Signed-off-by: Sudip Mukherjee --- drivers/video/fbdev/i740fb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c index 452e116..cf5ccd0 100644 --- a/drivers/video/fbdev/i740fb.c +++ b/drivers/video/fbdev/i740fb.c @@ -346,11 +346,10 @@ static void i740_calc_vclk(u32 freq, struct i740fb_par *par) const u32 err_target = freq / (1000 * I740_RFREQ / I740_FFIX); u32 err_best = 512 * I740_FFIX; u32 f_err, f_vco; - int m_best = 0, n_best = 0, p_best = 0, d_best = 0; + int m_best = 0, n_best = 0, p_best = 0; int m, n; p_best = min(15, ilog2(I740_MAX_VCO_FREQ / (freq / I740_RFREQ_FIX))); - d_best = 0; f_vco = (freq * (1 << p_best)) / I740_RFREQ_FIX; freq = freq / I740_RFREQ_FIX; @@ -363,7 +362,7 @@ static void i740_calc_vclk(u32 freq, struct i740fb_par *par) m = 3; { - u32 f_out = (((m * I740_REF_FREQ * (4 << 2 * d_best)) + u32 f_out = (((m * I740_REF_FREQ * 4) / n) + ((1 << p_best) / 2)) / (1 << p_best); f_err = (freq - f_out); @@ -386,8 +385,7 @@ static void i740_calc_vclk(u32 freq, struct i740fb_par *par) par->video_clk2_n = (n_best - 2) & 0xFF; par->video_clk2_mn_msbs = ((((n_best - 2) >> 4) & VCO_N_MSBS) | (((m_best - 2) >> 8) & VCO_M_MSBS)); - par->video_clk2_div_sel = - ((p_best << 4) | (d_best ? 4 : 0) | REF_DIV_1); + par->video_clk2_div_sel = ((p_best << 4) | REF_DIV_1); } static int i740fb_decode_var(const struct fb_var_screeninfo *var,