From patchwork Tue Jun 29 07:08:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 57243 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id BEBCEB7191 for ; Tue, 29 Jun 2010 17:08:35 +1000 (EST) Received: from smtps.tip.net.au (chilli.pcug.org.au [203.10.76.44]) by ozlabs.org (Postfix) with ESMTP id 56544B6EEE for ; Tue, 29 Jun 2010 17:08:29 +1000 (EST) Received: from canb.auug.org.au (ibmaus65.lnk.telstra.net [165.228.126.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtps.tip.net.au (Postfix) with ESMTPSA id F2B90144009; Tue, 29 Jun 2010 17:08:28 +1000 (EST) Date: Tue, 29 Jun 2010 17:08:29 +1000 From: Stephen Rothwell To: Benjamin Herrenschmidt Subject: [PATCH] powerpc: fix feature-fixup tests for gcc 4.5 Message-Id: <20100629170829.8ff9a7a1.sfr@canb.auug.org.au> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Mime-Version: 1.0 Cc: ppc-dev X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org The feature-fixup test declare some extern void variables and then take their addresses. Fix this by declaring them as extern u8 instead. Fixes these warnings (treated as errors): CC arch/powerpc/lib/feature-fixups.o cc1: warnings being treated as errors arch/powerpc/lib/feature-fixups.c: In function 'test_cpu_macros': arch/powerpc/lib/feature-fixups.c:293:23: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:294:9: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:297:2: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:297:2: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c: In function 'test_fw_macros': arch/powerpc/lib/feature-fixups.c:306:23: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:307:9: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:310:2: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:310:2: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c: In function 'test_lwsync_macros': arch/powerpc/lib/feature-fixups.c:321:23: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:322:9: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:326:3: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:326:3: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:329:3: error: taking address of expression of type 'void' arch/powerpc/lib/feature-fixups.c:329:3: error: taking address of expression of type 'void' Signed-off-by: Stephen Rothwell --- arch/powerpc/lib/feature-fixups.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) I haven't actually booted this, just built it. diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c index e640175..0d08d01 100644 --- a/arch/powerpc/lib/feature-fixups.c +++ b/arch/powerpc/lib/feature-fixups.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -288,8 +289,8 @@ static void test_alternative_case_with_external_branch(void) static void test_cpu_macros(void) { - extern void ftr_fixup_test_FTR_macros; - extern void ftr_fixup_test_FTR_macros_expected; + extern u8 ftr_fixup_test_FTR_macros; + extern u8 ftr_fixup_test_FTR_macros_expected; unsigned long size = &ftr_fixup_test_FTR_macros_expected - &ftr_fixup_test_FTR_macros; @@ -301,8 +302,8 @@ static void test_cpu_macros(void) static void test_fw_macros(void) { #ifdef CONFIG_PPC64 - extern void ftr_fixup_test_FW_FTR_macros; - extern void ftr_fixup_test_FW_FTR_macros_expected; + extern u8 ftr_fixup_test_FW_FTR_macros; + extern u8 ftr_fixup_test_FW_FTR_macros_expected; unsigned long size = &ftr_fixup_test_FW_FTR_macros_expected - &ftr_fixup_test_FW_FTR_macros; @@ -314,10 +315,10 @@ static void test_fw_macros(void) static void test_lwsync_macros(void) { - extern void lwsync_fixup_test; - extern void end_lwsync_fixup_test; - extern void lwsync_fixup_test_expected_LWSYNC; - extern void lwsync_fixup_test_expected_SYNC; + extern u8 lwsync_fixup_test; + extern u8 end_lwsync_fixup_test; + extern u8 lwsync_fixup_test_expected_LWSYNC; + extern u8 lwsync_fixup_test_expected_SYNC; unsigned long size = &end_lwsync_fixup_test - &lwsync_fixup_test;