From patchwork Thu Nov 21 15:49:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 3219781 Return-Path: X-Original-To: patchwork-intel-gfx@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 D52E5C045B for ; Thu, 21 Nov 2013 15:50:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3AF4D20763 for ; Thu, 21 Nov 2013 15:50:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5C51020788 for ; Thu, 21 Nov 2013 15:50:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5076B105B02 for ; Thu, 21 Nov 2013 07:50:23 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail.skyhub.de (mail.skyhub.de [78.46.96.112]) by gabe.freedesktop.org (Postfix) with ESMTP id 37099105ABA; Thu, 21 Nov 2013 07:49:55 -0800 (PST) X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1385048993; bh=vGK8vsUVGz/kE3yCCBd3PqIyAI0v4amhb4NBiPeknoU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding; b=eJ52DsjU9z6c186cyypIULaSfPqLsALiovZVV KbhQT/RIbZXY0GfDfqKiVEgr1f8/VOC9XUzlZ/GyBGPxUf9kSdznniBGMBSfPaoDs3/ 3HsOyakHFFXRVB1KqbyEJI5WcJ0VSwUS58zTyluVwVjYnJbxNMhyTR7OMltbRXldUfc = Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6e+fZkSujt3b; Thu, 21 Nov 2013 16:49:53 +0100 (CET) Received: from liondog.tnic (p4FF1CF46.dip0.t-ipconnect.de [79.241.207.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E93AB1DA279; Thu, 21 Nov 2013 16:49:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1385048993; bh=vGK8vsUVGz/kE3yCCBd3PqIyAI0v4amhb4NBiPeknoU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding; b=eJ52DsjU9z6c186cyypIULaSfPqLsALiovZVV KbhQT/RIbZXY0GfDfqKiVEgr1f8/VOC9XUzlZ/GyBGPxUf9kSdznniBGMBSfPaoDs3/ 3HsOyakHFFXRVB1KqbyEJI5WcJ0VSwUS58zTyluVwVjYnJbxNMhyTR7OMltbRXldUfc = Received: by liondog.tnic (Postfix, from userid 1000) id B665E107169; Thu, 21 Nov 2013 16:49:46 +0100 (CET) From: Borislav Petkov To: LKML Date: Thu, 21 Nov 2013 16:49:46 +0100 Message-Id: <1385048986-14478-1-git-send-email-bp@alien8.de> X-Mailer: git-send-email 1.8.4 MIME-Version: 1.0 Cc: David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, Borislav Petkov , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] i915, debugfs: Fix uninitialized warning X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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: Borislav Petkov gcc complains that: drivers/gpu/drm/i915/i915_debugfs.c: In function ‘display_crc_ctl_write’: drivers/gpu/drm/i915/i915_debugfs.c:2393:2: warning: ‘val’ may be used uninitialized in this function [-Wuninitialized] drivers/gpu/drm/i915/i915_debugfs.c:2350:6: note: ‘val’ was declared here but it can't see that we're going to use val only in the success case. So shut it up. Cc: Daniel Vetter Cc: David Airlie Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Borislav Petkov --- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 6ed45a984230..1191aa47adc9 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2347,7 +2347,7 @@ static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe, { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[pipe]; - u32 val; + u32 val = 0; /* shut up gcc */ int ret; if (pipe_crc->source == source)