]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Remove spinlock workaround for pre 2.95 gccs
authorAndi Kleen <ak@muc.de>
Sat, 21 Jun 2003 03:18:55 +0000 (20:18 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sat, 21 Jun 2003 03:18:55 +0000 (20:18 -0700)
Remove the empty initializer workaround that was added for egcs 1.1.
Only 2.95+ is supported now, so all compilers should support empty
structures.

The if just checked for __GNUC__, which means that 2.95 got
the workaround (and the incompatibility) too even though it didn't need it.

Advantage is that gcc 2.95 and 3.x compiled kernels are now potentially
binary compatible.  Module loading still checks the compiler version,
but it might be removable.

include/linux/spinlock.h

index 148ea9d43873e28b0aa2fb1a912494e4d725c7e8..4e2c1973ae67a40fa825f70bebbfb8e8142473a6 100644 (file)
@@ -146,13 +146,8 @@ typedef struct {
 /*
  * gcc versions before ~2.95 have a nasty bug with empty initializers.
  */
-#if (__GNUC__ > 2)
-  typedef struct { } spinlock_t;
-  #define SPIN_LOCK_UNLOCKED (spinlock_t) { }
-#else
-  typedef struct { int gcc_is_buggy; } spinlock_t;
-  #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
-#endif
+typedef struct { } spinlock_t;
+#define SPIN_LOCK_UNLOCKED (spinlock_t) { }
 
 /*
  * If CONFIG_SMP is unset, declare the _raw_* definitions as nops