Skip to contentSkip to conversation

kexec: fix a compiler warning on ppc64

PATCH Applied Amerigo Wang 2 participants 2 messages Apr 27, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kexec: fix a compiler warning on ppc64

I got the following warning when I compiled kexec-tools on ppc64,

In file included from kexec/arch/ppc64/kexec-ppc64.c:32:
kexec/arch/ppc64/../../kexec-syscall.h:118:1: warning: "KEXEC_ARCH_NATIVE" redefined kexec/arch/ppc64/../../kexec-syscall.h:115:1: warning: this is the location of the previous definition

This is due to that ppc64 defines bot __powerpc64__ and __powerpc__, this patch fixes that warning.

Cc Simon Horman <[email protected]>

---

kexec/kexec-syscall.h +4 -3
index 03d7abc..b082f40 100644
@@ -113,9 +113,10 @@ static inline long kexec_reboot(void)
 #endif
 #ifdef __powerpc64__
 #define KEXEC_ARCH_NATIVE	KEXEC_ARCH_PPC64
-#endif
-#ifdef __powerpc__
-#define KEXEC_ARCH_NATIVE	KEXEC_ARCH_PPC
+#else
+ #ifdef __powerpc__
+ #define KEXEC_ARCH_NATIVE	KEXEC_ARCH_PPC
+ #endif
 #endif
 #ifdef __x86_64__
 #define KEXEC_ARCH_NATIVE	KEXEC_ARCH_X86_64

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Applied
#1 lore raw
Quoted 11 lines · Amerigo Wang

I got the following warning when I compiled kexec-tools on ppc64,

In file included from kexec/arch/ppc64/kexec-ppc64.c:32:
kexec/arch/ppc64/../../kexec-syscall.h:118:1: warning: "KEXEC_ARCH_NATIVE" redefined kexec/arch/ppc64/../../kexec-syscall.h:115:1: warning: this is the location of the previous definition

This is due to that ppc64 defines bot __powerpc64__ and __powerpc__, this patch fixes that warning.

Cc Simon Horman <[email protected]>

Thanks, applied.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec