Skip to content

Commit c86d9f8

Browse files
Seongsu Parkctmarinas
authored andcommitted
arm64: atomics: lse: Remove unused parameters from ATOMIC_FETCH_OP_AND macros
The ATOMIC_FETCH_OP_AND and ATOMIC64_FETCH_OP_AND macros accept 'mb' and 'cl' parameters but never use them in their implementation. These macros simply delegate to the corresponding andnot functions, which handle the actual atomic operations and memory barriers. Signed-off-by: Seongsu Park <sgsu.park@samsung.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent f208101 commit c86d9f8

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

arch/arm64/include/asm/atomic_lse.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,17 @@ static __always_inline void __lse_atomic_and(int i, atomic_t *v)
103103
return __lse_atomic_andnot(~i, v);
104104
}
105105

106-
#define ATOMIC_FETCH_OP_AND(name, mb, cl...) \
106+
#define ATOMIC_FETCH_OP_AND(name) \
107107
static __always_inline int \
108108
__lse_atomic_fetch_and##name(int i, atomic_t *v) \
109109
{ \
110110
return __lse_atomic_fetch_andnot##name(~i, v); \
111111
}
112112

113-
ATOMIC_FETCH_OP_AND(_relaxed, )
114-
ATOMIC_FETCH_OP_AND(_acquire, a, "memory")
115-
ATOMIC_FETCH_OP_AND(_release, l, "memory")
116-
ATOMIC_FETCH_OP_AND( , al, "memory")
113+
ATOMIC_FETCH_OP_AND(_relaxed)
114+
ATOMIC_FETCH_OP_AND(_acquire)
115+
ATOMIC_FETCH_OP_AND(_release)
116+
ATOMIC_FETCH_OP_AND( )
117117

118118
#undef ATOMIC_FETCH_OP_AND
119119

@@ -210,17 +210,17 @@ static __always_inline void __lse_atomic64_and(s64 i, atomic64_t *v)
210210
return __lse_atomic64_andnot(~i, v);
211211
}
212212

213-
#define ATOMIC64_FETCH_OP_AND(name, mb, cl...) \
213+
#define ATOMIC64_FETCH_OP_AND(name) \
214214
static __always_inline long \
215215
__lse_atomic64_fetch_and##name(s64 i, atomic64_t *v) \
216216
{ \
217217
return __lse_atomic64_fetch_andnot##name(~i, v); \
218218
}
219219

220-
ATOMIC64_FETCH_OP_AND(_relaxed, )
221-
ATOMIC64_FETCH_OP_AND(_acquire, a, "memory")
222-
ATOMIC64_FETCH_OP_AND(_release, l, "memory")
223-
ATOMIC64_FETCH_OP_AND( , al, "memory")
220+
ATOMIC64_FETCH_OP_AND(_relaxed)
221+
ATOMIC64_FETCH_OP_AND(_acquire)
222+
ATOMIC64_FETCH_OP_AND(_release)
223+
ATOMIC64_FETCH_OP_AND( )
224224

225225
#undef ATOMIC64_FETCH_OP_AND
226226

0 commit comments

Comments
 (0)