Re: [RESEND RFC PATCH v2 1/6] riscv/cmpxchg: Deduplicate cmpxchg() asm functions

From: Andrea Parri
Date: Wed Mar 22 2023 - 03:50:59 EST


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