public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* asm-x86/byteorder.h: clean up for userspace
@ 2007-12-31 18:12 Mike Frysinger
  2008-01-01 15:22 ` Ingo Molnar
  2008-01-01 17:47 ` Christoph Hellwig
  0 siblings, 2 replies; 7+ messages in thread
From: Mike Frysinger @ 2007-12-31 18:12 UTC (permalink / raw)
  To: tglx, mingo, hpa, Andi Kleen; +Cc: LKML

Since asm-x86/byteorder.h is exported to userspace, use __asm__ rather than
asm in its code.

Signed-Off-By: Mike Frysinger <vapier@gentoo.org>
---
diff --git a/include/asm-x86/byteorder.h b/include/asm-x86/byteorder.h
index 1f2d6d5..fe2f2e5 100644
--- a/include/asm-x86/byteorder.h
+++ b/include/asm-x86/byteorder.h
@@ -30,13 +30,13 @@ static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 val)
 	} v;
 	v.u = val;
 #ifdef CONFIG_X86_BSWAP
-	asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
+	__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
 	    : "=r" (v.s.a), "=r" (v.s.b)
 	    : "0" (v.s.a), "1" (v.s.b));
 #else
 	v.s.a = ___arch__swab32(v.s.a);
 	v.s.b = ___arch__swab32(v.s.b);
-	asm("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
+	__asm__("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
 #endif
 	return v.u;
 }

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-02  2:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-31 18:12 asm-x86/byteorder.h: clean up for userspace Mike Frysinger
2008-01-01 15:22 ` Ingo Molnar
2008-01-01 17:47 ` Christoph Hellwig
2008-01-01 18:17   ` Mike Frysinger
2008-01-01 21:19   ` H. Peter Anvin
2008-01-02  1:31     ` Adrian Bunk
2008-01-02  2:22       ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox