[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZBqzUplarOxIXrvN@andrea>
Date: Wed, 22 Mar 2023 08:50:42 +0100
From: Andrea Parri <parri.andrea@...il.com>
To: Leonardo Bras Soares Passos <leobras@...hat.com>
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Guo Ren <guoren@...nel.org>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RESEND RFC PATCH v2 1/6] riscv/cmpxchg: Deduplicate cmpxchg()
asm functions
> > Though I'm not really a fan of macros depending on local variables with
> > "magic" names, can this be avoided?
>
> You mean __ret, __rc, __ptr, __old and __new ?
Indeed, the wording was from coding-style.rst
> If so, yes, we could add them to the macro signature, but it would
> become quite big with not much to gain. To reduce impact it could be
> something like:
>
> +#define ___cmpxchg(lr_sfx, sc_sfx, prepend, append, ret, r, p, o, n)
>
> Is this a possible fix?
I believe that'll do it, open to other approaches.
Andrea
Powered by blists - more mailing lists