Skip to contentSkip to conversation

m68knommu: use asm-generic/bitops/ext2-atomic.h

PATCH In review Akinobu Mita 2 participants 3 messages Apr 17, 2011 – Apr 20, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68knommu: use asm-generic/bitops/ext2-atomic.h

m68knommu can use generic implementation of ext2 atomic bitops.

---
 arch/m68k/include/asm/bitops_no.h |   18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)
arch/m68k/include/asm/bitops_no.h +1 -17
index 7d3779f..6b0e2d3 100644
@@ -246,23 +246,7 @@ static inline int __test_and_clear_bit_le(int nr, volatile void *addr)
 	return retval;
 }
 
-#define ext2_set_bit_atomic(lock, nr, addr)		\
-	({						\
-		int ret;				\
-		spin_lock(lock);			\
-		ret = __test_and_set_bit_le((nr), (addr));	\
-		spin_unlock(lock);			\
-		ret;					\
-	})
-
-#define ext2_clear_bit_atomic(lock, nr, addr)		\
-	({						\
-		int ret;				\
-		spin_lock(lock);			\
-		ret = __test_and_clear_bit_le((nr), (addr));	\
-		spin_unlock(lock);			\
-		ret;					\
-	})
+#include <asm-generic/bitops/ext2-atomic.h>
 
 static inline int test_bit_le(int nr, const volatile void *addr)
 {
Signature · 1 line
1.7.4.2
Acked-by on v1 1/1
#1 lore raw

Hi Akinobu,

Quoted 4 lines · Akinobu Mita

m68knommu can use generic implementation of ext2 atomic bitops.

That looks good to me, so:

Do you want me to add it to the m68knommu git tree, and pass to Linus in the next merge window?

Regards
Greg

Quoted 33 lines
---
  arch/m68k/include/asm/bitops_no.h |   18 +-----------------
  1 files changed, 1 insertions(+), 17 deletions(-)
arch/m68k/include/asm/bitops_no.h +1 -17
index 7d3779f..6b0e2d3 100644
@@ -246,23 +246,7 @@ static inline int __test_and_clear_bit_le(int nr, volatile void *addr)
  	return retval;
  }
 
-#define ext2_set_bit_atomic(lock, nr, addr)		\
-	({						\
-		int ret;				\
-		spin_lock(lock);			\
-		ret = __test_and_set_bit_le((nr), (addr));	\
-		spin_unlock(lock);			\
-		ret;					\
-	})
-
-#define ext2_clear_bit_atomic(lock, nr, addr)		\
-	({						\
-		int ret;				\
-		spin_lock(lock);			\
-		ret = __test_and_clear_bit_le((nr), (addr));	\
-		spin_unlock(lock);			\
-		ret;					\
-	})
+#include<asm-generic/bitops/ext2-atomic.h>
 
  static inline int test_bit_le(int nr, const volatile void *addr)
  {
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com