Index: kernel/generic/src/synch/spinlock.c
===================================================================
--- kernel/generic/src/synch/spinlock.c	(revision 111b9b97905c174ce8c3ed7e4e2a890da2be2d66)
+++ kernel/generic/src/synch/spinlock.c	(revision 2a230b65b43ab13315cd61918a3838394ff1c3c7)
@@ -37,4 +37,6 @@
  */
 
+#ifdef CONFIG_SMP
+
 #include <arch/asm.h>
 #include <synch/spinlock.h>
@@ -56,9 +58,7 @@
 void spinlock_initialize(spinlock_t *lock, const char *name)
 {
-#ifdef CONFIG_SMP
 	atomic_flag_clear_explicit(&lock->flag, memory_order_relaxed);
 #ifdef CONFIG_DEBUG_SPINLOCK
 	lock->name = name;
-#endif
 #endif
 }
@@ -73,5 +73,4 @@
 	preemption_disable();
 
-#ifdef CONFIG_SMP
 	bool deadlock_reported = false;
 	size_t i = 0;
@@ -120,6 +119,4 @@
 	if (deadlock_reported)
 		printf("cpu%u: not deadlocked\n", CPU->id);
-
-#endif
 }
 
@@ -130,5 +127,4 @@
 void spinlock_unlock(spinlock_t *lock)
 {
-#ifdef CONFIG_SMP
 #ifdef CONFIG_DEBUG_SPINLOCK
 	ASSERT_SPINLOCK(spinlock_locked(lock), lock);
@@ -136,6 +132,4 @@
 
 	atomic_flag_clear_explicit(&lock->flag, memory_order_release);
-#endif
-
 	preemption_enable();
 }
@@ -154,5 +148,4 @@
 	preemption_disable();
 
-#ifdef CONFIG_SMP
 	bool ret = !atomic_flag_test_and_set_explicit(&lock->flag, memory_order_acquire);
 
@@ -161,7 +154,4 @@
 
 	return ret;
-#else
-	return true;
-#endif
 }
 
@@ -173,5 +163,4 @@
 bool spinlock_locked(spinlock_t *lock)
 {
-#ifdef CONFIG_SMP
 	// NOTE: Atomic flag doesn't support simple atomic read (by design),
 	//       so instead we test_and_set and then clear if necessary.
@@ -183,8 +172,7 @@
 		atomic_flag_clear_explicit(&lock->flag, memory_order_relaxed);
 	return ret;
-#else
-	return true;
-#endif
 }
+
+#endif  /* CONFIG_SMP */
 
 /** @}
