From: Mark Rutland <mark.rutland@arm.com>
To: Seongsu Park <sgsu.park@samsung.com>
Cc: will@kernel.org, peterz@infradead.org, boqun.feng@gmail.com,
gary@garyguo.net, catalin.marinas@arm.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: atomics: lse: Remove unused parameters from ATOMIC_FETCH_OP_AND macros
Date: Wed, 26 Nov 2025 09:36:32 +0000 [thread overview]
Message-ID: <aSa_YjbomFs2AIWv@J2N7QTR9R3> (raw)
In-Reply-To: <20251126021025.3239562-1-sgsu.park@samsung.com>
On Wed, Nov 26, 2025 at 11:10:25AM +0900, Seongsu Park wrote:
> 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>
FWIW, this was a leftover from commit:
5e9e43c987b2 ("arm64: atomics: lse: define ANDs in terms of ANDNOTs")
... where I missed the leftover macro arguments.
AFAICT there aren't any other leftover macro arguments from that round
of asm improvments (or otherwise), so:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Mark.
> ---
> arch/arm64/include/asm/atomic_lse.h | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm64/include/asm/atomic_lse.h b/arch/arm64/include/asm/atomic_lse.h
> index 87f568a94e55..afad1849c4cf 100644
> --- a/arch/arm64/include/asm/atomic_lse.h
> +++ b/arch/arm64/include/asm/atomic_lse.h
> @@ -103,17 +103,17 @@ static __always_inline void __lse_atomic_and(int i, atomic_t *v)
> return __lse_atomic_andnot(~i, v);
> }
>
> -#define ATOMIC_FETCH_OP_AND(name, mb, cl...) \
> +#define ATOMIC_FETCH_OP_AND(name) \
> static __always_inline int \
> __lse_atomic_fetch_and##name(int i, atomic_t *v) \
> { \
> return __lse_atomic_fetch_andnot##name(~i, v); \
> }
>
> -ATOMIC_FETCH_OP_AND(_relaxed, )
> -ATOMIC_FETCH_OP_AND(_acquire, a, "memory")
> -ATOMIC_FETCH_OP_AND(_release, l, "memory")
> -ATOMIC_FETCH_OP_AND( , al, "memory")
> +ATOMIC_FETCH_OP_AND(_relaxed)
> +ATOMIC_FETCH_OP_AND(_acquire)
> +ATOMIC_FETCH_OP_AND(_release)
> +ATOMIC_FETCH_OP_AND( )
>
> #undef ATOMIC_FETCH_OP_AND
>
> @@ -210,17 +210,17 @@ static __always_inline void __lse_atomic64_and(s64 i, atomic64_t *v)
> return __lse_atomic64_andnot(~i, v);
> }
>
> -#define ATOMIC64_FETCH_OP_AND(name, mb, cl...) \
> +#define ATOMIC64_FETCH_OP_AND(name) \
> static __always_inline long \
> __lse_atomic64_fetch_and##name(s64 i, atomic64_t *v) \
> { \
> return __lse_atomic64_fetch_andnot##name(~i, v); \
> }
>
> -ATOMIC64_FETCH_OP_AND(_relaxed, )
> -ATOMIC64_FETCH_OP_AND(_acquire, a, "memory")
> -ATOMIC64_FETCH_OP_AND(_release, l, "memory")
> -ATOMIC64_FETCH_OP_AND( , al, "memory")
> +ATOMIC64_FETCH_OP_AND(_relaxed)
> +ATOMIC64_FETCH_OP_AND(_acquire)
> +ATOMIC64_FETCH_OP_AND(_release)
> +ATOMIC64_FETCH_OP_AND( )
>
> #undef ATOMIC64_FETCH_OP_AND
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-11-26 9:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20251126021037epcas1p2c5caf948ede87748ee1d4ef536a62126@epcas1p2.samsung.com>
2025-11-26 2:10 ` [PATCH] arm64: atomics: lse: Remove unused parameters from ATOMIC_FETCH_OP_AND macros Seongsu Park
2025-11-26 9:36 ` Mark Rutland [this message]
2025-11-27 19:15 ` Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aSa_YjbomFs2AIWv@J2N7QTR9R3 \
--to=mark.rutland@arm.com \
--cc=boqun.feng@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=gary@garyguo.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sgsu.park@samsung.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox