Index: kernel/arch/arm32/include/atomic.h
===================================================================
--- kernel/arch/arm32/include/atomic.h	(revision dabdd1aaada964f4510bd352506e4f47c078c88d)
+++ kernel/arch/arm32/include/atomic.h	(revision 94d484ac742127ae8d87a7e0bb630fafe11f65be)
@@ -47,8 +47,6 @@
  *
  */
-static inline long atomic_add(atomic_t *val, int i)
+static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)
 {
-	long ret;
-
 	/*
 	 * This implementation is for UP pre-ARMv6 systems where we do not have
@@ -57,5 +55,5 @@
 	ipl_t ipl = interrupts_disable();
 	val->count += i;
-	ret = val->count;
+	atomic_count_t ret = val->count;
 	interrupts_restore(ipl);
 	
@@ -66,4 +64,5 @@
  *
  * @param val Variable to be incremented.
+ *
  */
 static inline void atomic_inc(atomic_t *val)
@@ -75,4 +74,5 @@
  *
  * @param val Variable to be decremented.
+ *
  */
 static inline void atomic_dec(atomic_t *val) {
@@ -84,6 +84,7 @@
  * @param val Variable to be incremented.
  * @return    Value after incrementation.
+ *
  */
-static inline long atomic_preinc(atomic_t *val)
+static inline atomic_count_t atomic_preinc(atomic_t *val)
 {
 	return atomic_add(val, 1);
@@ -94,6 +95,7 @@
  * @param val Variable to be decremented.
  * @return    Value after decrementation.
+ *
  */
-static inline long atomic_predec(atomic_t *val)
+static inline atomic_count_t atomic_predec(atomic_t *val)
 {
 	return atomic_add(val, -1);
@@ -104,6 +106,7 @@
  * @param val Variable to be incremented.
  * @return    Value before incrementation.
+ *
  */
-static inline long atomic_postinc(atomic_t *val)
+static inline atomic_count_t atomic_postinc(atomic_t *val)
 {
 	return atomic_add(val, 1) - 1;
@@ -114,6 +117,7 @@
  * @param val Variable to be decremented.
  * @return    Value before decrementation.
+ *
  */
-static inline long atomic_postdec(atomic_t *val)
+static inline atomic_count_t atomic_postdec(atomic_t *val)
 {
 	return atomic_add(val, -1) + 1;
Index: kernel/arch/arm32/include/types.h
===================================================================
--- kernel/arch/arm32/include/types.h	(revision dabdd1aaada964f4510bd352506e4f47c078c88d)
+++ kernel/arch/arm32/include/types.h	(revision 94d484ac742127ae8d87a7e0bb630fafe11f65be)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup arm32	
+/** @addtogroup arm32
  * @{
  */
@@ -38,7 +38,7 @@
 
 #ifndef DOXYGEN
-#	define ATTRIBUTE_PACKED __attribute__ ((packed))
+	#define ATTRIBUTE_PACKED __attribute__((packed))
 #else
-#	define ATTRIBUTE_PACKED
+	#define ATTRIBUTE_PACKED
 #endif
 
@@ -62,4 +62,5 @@
 typedef uint32_t unative_t;
 typedef int32_t native_t;
+typedef uint32_t atomic_count_t;
 
 typedef struct {
