Re: [RESEND][PATCH] tracing: gfp: Remove duplication of recording GFP flags
From: Steven Rostedt
Date: Fri Mar 14 2025 - 08:27:22 EST
On Thu, 13 Mar 2025 12:53:13 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> > --- a/include/trace/events/mmflags.h
> > +++ b/include/trace/events/mmflags.h
> > @@ -101,7 +101,7 @@ TRACE_DEFINE_ENUM(___GFP_LAST_BIT);
> > gfpflag_string(GFP_DMA32), \
> > gfpflag_string(__GFP_RECLAIM), \
> > TRACE_GFP_FLAGS \
> > - { 0, "none" }
> > + { 0, NULL }
> >
> > #define show_gfp_flags(flags) \
> > (flags) ? __print_flags(flags, "|", __def_gfpflag_names \
> >
> > It seems to be safe because the callers end up the cycle when .name == NULL.
> >
> > I think that it actually allows to remove similar trailing {} but I am not sure
> > if we want it.
>
> Hmm, I could get rid of that last one with this patch. What do you think?
OK, I think this is too hacky, and it only affects tracing if there's a
flag not defined (which never happened so I didn't see this issue).
I'll just go with your approach.
You want to send a formal patch?
-- Steve