aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2010-06-28 17:08:29 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-08 04:11:41 -0400
commit3880ecb05bc5ece4c6e392a21ea77518e55b4935 (patch)
tree9acfbff47a59704c3e47b5e03b2790dad94d7b8c /arch/powerpc/lib
parent9ce91685f9db48b7050bed916bea097fcbaea093 (diff)
powerpc: Fix feature-fixup tests for gcc 4.5
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 <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r--arch/powerpc/lib/feature-fixups.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
index e640175b65ae..0d08d0171392 100644
--- a/arch/powerpc/lib/feature-fixups.c
+++ b/arch/powerpc/lib/feature-fixups.c
@@ -12,6 +12,7 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/types.h>
15#include <linux/kernel.h> 16#include <linux/kernel.h>
16#include <linux/string.h> 17#include <linux/string.h>
17#include <linux/init.h> 18#include <linux/init.h>
@@ -288,8 +289,8 @@ static void test_alternative_case_with_external_branch(void)
288 289
289static void test_cpu_macros(void) 290static void test_cpu_macros(void)
290{ 291{
291 extern void ftr_fixup_test_FTR_macros; 292 extern u8 ftr_fixup_test_FTR_macros;
292 extern void ftr_fixup_test_FTR_macros_expected; 293 extern u8 ftr_fixup_test_FTR_macros_expected;
293 unsigned long size = &ftr_fixup_test_FTR_macros_expected - 294 unsigned long size = &ftr_fixup_test_FTR_macros_expected -
294 &ftr_fixup_test_FTR_macros; 295 &ftr_fixup_test_FTR_macros;
295 296
@@ -301,8 +302,8 @@ static void test_cpu_macros(void)
301static void test_fw_macros(void) 302static void test_fw_macros(void)
302{ 303{
303#ifdef CONFIG_PPC64 304#ifdef CONFIG_PPC64
304 extern void ftr_fixup_test_FW_FTR_macros; 305 extern u8 ftr_fixup_test_FW_FTR_macros;
305 extern void ftr_fixup_test_FW_FTR_macros_expected; 306 extern u8 ftr_fixup_test_FW_FTR_macros_expected;
306 unsigned long size = &ftr_fixup_test_FW_FTR_macros_expected - 307 unsigned long size = &ftr_fixup_test_FW_FTR_macros_expected -
307 &ftr_fixup_test_FW_FTR_macros; 308 &ftr_fixup_test_FW_FTR_macros;
308 309
@@ -314,10 +315,10 @@ static void test_fw_macros(void)
314 315
315static void test_lwsync_macros(void) 316static void test_lwsync_macros(void)
316{ 317{
317 extern void lwsync_fixup_test; 318 extern u8 lwsync_fixup_test;
318 extern void end_lwsync_fixup_test; 319 extern u8 end_lwsync_fixup_test;
319 extern void lwsync_fixup_test_expected_LWSYNC; 320 extern u8 lwsync_fixup_test_expected_LWSYNC;
320 extern void lwsync_fixup_test_expected_SYNC; 321 extern u8 lwsync_fixup_test_expected_SYNC;
321 unsigned long size = &end_lwsync_fixup_test - 322 unsigned long size = &end_lwsync_fixup_test -
322 &lwsync_fixup_test; 323 &lwsync_fixup_test;
323 324