2011-04-17 13:57:52

by Akinobu Mita

[permalink] [raw]
Subject: [PATCH] m68knommu: use asm-generic/bitops/ext2-atomic.h

m68knommu can use generic implementation of ext2 atomic bitops.

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Greg Ungerer <[email protected]>
---
arch/m68k/include/asm/bitops_no.h | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/arch/m68k/include/asm/bitops_no.h b/arch/m68k/include/asm/bitops_no.h
index 7d3779f..6b0e2d3 100644
--- a/arch/m68k/include/asm/bitops_no.h
+++ b/arch/m68k/include/asm/bitops_no.h
@@ -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)
{
--
1.7.4.2


2011-04-20 00:32:24

by Greg Ungerer

[permalink] [raw]
Subject: Re: [PATCH] m68knommu: use asm-generic/bitops/ext2-atomic.h

Hi Akinobu,

On 17/04/11 23:57, Akinobu Mita wrote:
> m68knommu can use generic implementation of ext2 atomic bitops.
>
> Signed-off-by: Akinobu Mita<[email protected]>
> Cc: Greg Ungerer<[email protected]>

That looks good to me, so:

Acked-by: Greg Ungerer<[email protected]>

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

Regards
Greg


> ---
> arch/m68k/include/asm/bitops_no.h | 18 +-----------------
> 1 files changed, 1 insertions(+), 17 deletions(-)
>
> diff --git a/arch/m68k/include/asm/bitops_no.h b/arch/m68k/include/asm/bitops_no.h
> index 7d3779f..6b0e2d3 100644
> --- a/arch/m68k/include/asm/bitops_no.h
> +++ b/arch/m68k/include/asm/bitops_no.h
> @@ -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)
> {


--
------------------------------------------------------------------------
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

2011-04-20 06:16:49

by Akinobu Mita

[permalink] [raw]
Subject: Re: [PATCH] m68knommu: use asm-generic/bitops/ext2-atomic.h

>> m68knommu can use generic implementation of ext2 atomic bitops.
>>
>> Signed-off-by: Akinobu Mita<[email protected]>
>> Cc: Greg Ungerer<[email protected]>
>
> That looks good to me, so:
>
> Acked-by: Greg Ungerer<[email protected]>

Thanks.

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

Yes. Please add it to the m68knommu git tree.