]> xenbits.xensource.com Git - people/liuw/rumprun.git/commitdiff
xen: cast to spinlock_t in spin_lock_init
authorWei Liu <liuw@liuw.name>
Tue, 21 Apr 2015 14:47:13 +0000 (15:47 +0100)
committerWei Liu <liuw@liuw.name>
Thu, 7 May 2015 09:41:44 +0000 (10:41 +0100)
Otherwise gcc won't compile this piece of code.

Signed-off-by: Wei Liu <liuw@liuw.name>
platform/xen/xen/include/mini-os/spinlock.h

index b87ffe52b40866bb8879d81699de522cdbf4e4a1..586e7d8a3e9ca77c79ae666039c6357359be5c73 100644 (file)
@@ -21,7 +21,7 @@ typedef struct {
 
 #define SPIN_LOCK_UNLOCKED ARCH_SPIN_LOCK_UNLOCKED
 
-#define spin_lock_init(x)      do { *(x) = SPIN_LOCK_UNLOCKED; } while(0)
+#define spin_lock_init(x)      do { *(x) = (spinlock_t)SPIN_LOCK_UNLOCKED; } while(0)
 
 /*
  * Simple spin lock operations.  There are two variants, one clears IRQ's