On Mon, 31 Aug 2026 15:25:37 -0400
Zi Yan <[email protected]> wrote:

> diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h
> index 935893e5ea53b..caf090cd6f85e 100644
> --- a/include/trace/events/mmflags.h
> +++ b/include/trace/events/mmflags.h
> @@ -144,7 +144,7 @@ TRACE_DEFINE_ENUM(___GFP_LAST_BIT);
>       DEF_PAGEFLAG_NAME(owner_2),                                     \
>       DEF_PAGEFLAG_NAME(arch_1),                                      \
>       DEF_PAGEFLAG_NAME(reserved),                                    \
> -     DEF_PAGEFLAG_NAME(private),                                     \
> +     { 1UL << __PG_folio, "folio" },                                 \
>       DEF_PAGEFLAG_NAME(private_2),                                   \
>       DEF_PAGEFLAG_NAME(writeback),                                   \
>       DEF_PAGEFLAG_NAME(head),                                        \

Hmm, just for consistency sake, can we create a:

 #define __DEF_PAGEFLAG_NAME(_name) { 1UL <<  __PG_##_name, __stringify(_name) }

Which is similar to:

 #define DEF_PAGEFLAG_NAME(_name) { 1UL <<  PG_##_name, __stringify(_name) }

But adds the "__" to the name. Then the above would look like:

        DEF_PAGEFLAG_NAME(reserved),                                    \
        __DEF_PAGEFLAG_NAME(folio),                                     \
        DEF_PAGEFLAG_NAME(private_2),                                   \
        DEF_PAGEFLAG_NAME(writeback),                                   \

Where the __DEF_PAGEFLAG_NAME() with the "__" still stands out, but the
code looks better than open coding it in the middle and making one wonder
why it was open coded. (It took me a bit to noticed the "__" difference.)

-- Steve

Reply via email to