From patchwork Sun Mar 10 17:53:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 2245141 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D11D83FC8A for ; Sun, 10 Mar 2013 17:53:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752711Ab3CJRxq (ORCPT ); Sun, 10 Mar 2013 13:53:46 -0400 Received: from mail.tpi.com ([70.99.223.143]:1715 "EHLO mail.tpi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752732Ab3CJRxp (ORCPT ); Sun, 10 Mar 2013 13:53:45 -0400 Received: from salmon.rtg.net (mail.tpi.com [70.99.223.143]) by mail.tpi.com (Postfix) with ESMTP id E455131855E; Sun, 10 Mar 2013 10:53:40 -0700 (PDT) Received: by salmon.rtg.net (Postfix, from userid 1000) id 9DCB0203BE; Sun, 10 Mar 2013 11:53:40 -0600 (MDT) From: Tim Gardner To: linux-kernel@vger.kernel.org Cc: Tim Gardner , Maik Broemme , Florian Tobias Schandinat , linux-fbdev@vger.kernel.org Subject: [PATCH linux-next] intelfb: intelfbhw_mode_to_hw: Silence m1/m2 'may be used uninitialized' warnings Date: Sun, 10 Mar 2013 11:53:31 -0600 Message-Id: <1362938011-85394-1-git-send-email-tim.gardner@canonical.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org drivers/video/intelfb/intelfbhw.c: In function 'intelfbhw_mode_to_hw': drivers/video/intelfb/intelfbhw.c:1144:35: warning: 'm2' may be used uninitialized in this function [-Wuninitialized] drivers/video/intelfb/intelfbhw.c:1145:13: warning: 'm1' may be used uninitialized in this function [-Wuninitialized] gcc version 4.6.3 Cc: Maik Broemme Cc: Florian Tobias Schandinat Cc: linux-fbdev@vger.kernel.org Signed-off-by: Tim Gardner --- drivers/video/intelfb/intelfbhw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index fbad61d..cb05307 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c @@ -935,7 +935,7 @@ static int splitp(int index, unsigned int p, unsigned int *retp1, static int calc_pll_params(int index, int clock, u32 *retm1, u32 *retm2, u32 *retn, u32 *retp1, u32 *retp2, u32 *retclock) { - u32 m1, m2, n, p1, p2, n1, testm; + u32 m1 = 0, m2 = 0, 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;