From patchwork Tue Oct 9 15:34:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1570551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 18037DFFAD for ; Tue, 9 Oct 2012 15:36:41 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TLbpG-00014h-U0; Tue, 09 Oct 2012 15:34:31 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TLbpC-00014S-QV for linux-arm-kernel@lists.infradead.org; Tue, 09 Oct 2012 15:34:27 +0000 Received: from klappe2.boeblingen.de.ibm.com (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MQs8Y-1Swpig3Dgc-00UIRK; Tue, 09 Oct 2012 17:34:24 +0200 From: Arnd Bergmann To: arm@kernel.org Subject: [PATCH 2/3] ARM: assabet: fix bogus warning in get_assabet_scr (again) Date: Tue, 9 Oct 2012 17:34:20 +0200 Message-Id: <1349796861-31164-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1349796861-31164-1-git-send-email-arnd@arndb.de> References: <1349796861-31164-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:Q8A2fTn+v1QVqF503evPEDgk2PK5aLIl5DZMso2hcVb QQolQAkRxrqGyGJtOBmkIzM6TjS/T7AbVE/ZUsQo+X98qDYg2A o31OLRFLhQPV9rETMvwG3X2wV7aQR5nXl2gR4+5fdbgYYpe5Mg SfFpRqXyrIHitj/pFzcIPXLuCMn2aqYxGAn2+ijbcpD1M31s90 i9NYoCct2BFXaYst2Za+kKbzKLLZUSZnEMIrJ8ULRCpt3FkwlF gJvZCowYvSj9X4w9k1pAIwWPnS4REUfpTzJFSKW/XE4aLVdpAg 6BuJHMCdUPNcvPYUcNsLZPOWYeU8aY+9kTEsNxBgWQri5yabop JEuQ79g+8CkEI21jeir6z8I8aCoS3QjH3lbAMqKFCk4x4Ub5CR mVGlpgLPJztDeCLeFfMTwaeNvptKr05CzE= X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.10 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Russell King , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Russell fixed this bogus warning before in 2f3eca8b4f "Shut up gcc warning in assabet.c", but apparently gcc has become smarter (or dumber) since 2005, and the same warning came up again. This uses the uninitialized_var() macro to convince gcc that the variable is actually being initialized. 100 times in fact. Without this patch, building assabet_defconfig results in: arch/arm/mach-sa1100/assabet.c: In function 'fixup_assabet': arch/arm/mach-sa1100/assabet.c:397:6: warning: 'scr' may be used uninitialized in this function [-Wuninitialized] arch/arm/mach-sa1100/assabet.c:389:16: note: 'scr' was declared here Signed-off-by: Arnd Bergmann Cc: Russell King --- arch/arm/mach-sa1100/assabet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index e1ccda6..6a7ad3c 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c @@ -388,7 +388,7 @@ static void __init map_sa1100_gpio_regs( void ) */ static void __init get_assabet_scr(void) { - unsigned long scr, i; + unsigned long uninitialized_var(scr), i; GPDR |= 0x3fc; /* Configure GPIO 9:2 as outputs */ GPSR = 0x3fc; /* Write 0xFF to GPIO 9:2 */