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: 12075 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AA87023F6D for ; Tue, 9 Oct 2012 15:34:28 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 51921A18CEF for ; Tue, 9 Oct 2012 15:34:28 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so11504949iej.11 for ; Tue, 09 Oct 2012 08:34:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=ahtyMBuvAyhjeip/pkWJKvRRnqSp8UBzFChCAA5S0qs=; b=T3Bve+glURS91iLaxvEsIuII98rpOvLcy3LFDJ6+Xo4VlfDX+zmCWsu9IdeDvKSFqf GWypOR7dyPpoYC/BWZ+9DP9LUdCmrfld5OGYg2/udD1Obq9WWgAAPKIldGDLSXYefIhv KfJ7z0BRSsdQEyfU00/lbUBE9maxxW4py+9UCcYJ7q3Jm6SpFUslT3UbyX11pPfXe9lq L7rDMhVdxzdcSi4rMT7OH/v4V5/DHcBg0FaHuBv9x9k36LIiS1GJRRAD7AwjayYaT9Ed NUU7Ks4yIHh8t1q27Erj/7ACz6H+eudCmbjT4r+1XLqCJe3l0EC3cd4gmRmwLFGUdhFg wvDQ== Received: by 10.42.57.10 with SMTP id b10mr11402974ich.54.1349796867623; Tue, 09 Oct 2012 08:34:27 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp74660igt; Tue, 9 Oct 2012 08:34:26 -0700 (PDT) Received: by 10.180.8.41 with SMTP id o9mr5587638wia.3.1349796865703; Tue, 09 Oct 2012 08:34:25 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.17.10]) by mx.google.com with ESMTPS id l10si15337125weo.11.2012.10.09.08.34.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Oct 2012 08:34:25 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.10; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Russell King 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-Gm-Message-State: ALoCoQmWOnQ1LrxyV0K47rjsGbZKszcWKBjL64o9xvEzBrXrQS3uS+Bco3tmK5qo1JWtdBNB9r1g 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 */