Skip to contentSkip to conversation

Fix warning in pvclock.c

PATCH Dave Jones 1 participant 2 messages Jul 13, 2009 – Jul 14, 2009 x86

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

when building 32-bit, I see this .. arch/x86/kernel/pvclock.c:63:7: warning: "__x86_64__" is not defined

arch/x86/kernel/pvclock.c +1 -1
index 4f9c55f..03801f2 100644
@@ -60,7 +60,7 @@ static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
 		"adc  %5,%%edx ; "
 		: "=A" (product), "=r" (tmp1), "=r" (tmp2)
 		: "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
-#elif __x86_64__
+#elif defined(__x86_64__)
 	__asm__ (
 		"mul %%rdx ; shrd $32,%%rdx,%%rax"
 		: "=a" (product) : "0" (delta), "d" ((u64)mul_frac) );
#1 lore raw

[tip:x86/urgent] x86: Fix warning in pvclock.c

Commit-ID:  2ad76643ff58bb8841f391ea8327c14abe273ea3
Gitweb:     http://git.kernel.org/tip/2ad76643ff58bb8841f391ea8327c14abe273ea3
Author:     Dave Jones <[email protected]>
AuthorDate: Mon, 13 Jul 2009 16:14:37 -0400
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Tue, 14 Jul 2009 16:25:05 +0200

x86: Fix warning in pvclock.c

when building 32-bit, I see this .. arch/x86/kernel/pvclock.c:63:7: warning: "__x86_64__" is not defined

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/pvclock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/pvclock.c +1 -1
index 4f9c55f..03801f2 100644
@@ -60,7 +60,7 @@ static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
 		"adc  %5,%%edx ; "
 		: "=A" (product), "=r" (tmp1), "=r" (tmp2)
 		: "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
-#elif __x86_64__
+#elif defined(__x86_64__)
 	__asm__ (
 		"mul %%rdx ; shrd $32,%%rdx,%%rax"
 		: "=a" (product) : "0" (delta), "d" ((u64)mul_frac) );