Re: [PATCH -tip v1 2/3] seqlock: Prefix internal seqcount_t-only macros with a "do_"

From: Jason Gunthorpe
Date: Mon Dec 07 2020 - 15:40:22 EST


On Sun, Dec 06, 2020 at 05:21:42PM +0100, Ahmed S. Darwish wrote:
> When the seqcount_LOCKNAME_t group of data types were introduced, two
> classes of seqlock.h sequence counter macros were added:
>
> - An external public API which can either take a plain seqcount_t or
> any of the seqcount_LOCKNAME_t variants.
>
> - An internal API which takes only a plain seqcount_t.
>
> To distinguish between the two groups, the "*_seqcount_t_*" pattern was
> used for the latter. This confused a number of mm/ call-site developers,
> and Linus also commented that it was not a standard practice for marking
> seqlock.h internal APIs.
>
> Distinguish the latter group of macros by prefixing a "do_".
>
> Link: https://lkml.kernel.org/r/CAHk-=wgB8nyOQufpn0o6a5BpJCJPnXvH+kRxApujhsgG+7qAwQ@xxxxxxxxxxxxxx
> Link: https://lkml.kernel.org/r/CAHk-=wikhGExmprXgaW+MVXG1zsGpztBbVwOb23vetk41EtTBQ@xxxxxxxxxxxxxx
> Signed-off-by: Ahmed S. Darwish <a.darwish@xxxxxxxxxxxxx>
> ---
> include/linux/seqlock.h | 66 ++++++++++++++++++++---------------------
> 1 file changed, 33 insertions(+), 33 deletions(-)

It is clearer, thank you

Jason