summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmerigo Wang <amwang@redhat.com>2011-04-27 11:53:23 +0800
committerSimon Horman <horms@verge.net.au>2011-04-27 15:14:27 +0900
commit37e6c4752822beb0feb00e4c2a462000550e105b (patch)
tree83fa4bd3f48eefa4345376179e33b8d52c51ba25
parente467cbaa6cfea50ce2a60de645af03a3c7580e20 (diff)
downloadkexec-tools-37e6c4752822beb0feb00e4c2a462000550e105b.tar.gz
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. Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/kexec-syscall.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
index 03d7abc3..b082f409 100644
--- a/kexec/kexec-syscall.h
+++ b/kexec/kexec-syscall.h
@@ -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