linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Vasily Averin <vvs@openvz.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	kernel@openvz.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH mm] tracing: incorrect gfp_t conversion
Date: Sun, 8 May 2022 21:37:18 +0100	[thread overview]
Message-ID: <Yngp/g2RYgnsdOJH@casper.infradead.org> (raw)
In-Reply-To: <20220507160010.aa2077e28c4710400e144bfb@linux-foundation.org>

On Sat, May 07, 2022 at 04:00:10PM -0700, Andrew Morton wrote:
> On Sat, 7 May 2022 15:48:35 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> 
> > I did the below.
> > 
> 
> Silly me, doesn't work.
> 
> > 
> > --- a/include/trace/events/mmflags.h~tracing-incorrect-gfp_t-conversion-fix
> > +++ a/include/trace/events/mmflags.h
> > @@ -13,53 +13,57 @@
> >   * Thus most bits set go first.
> >   */
> >  
> > +#define FUL __force unsigned long
> > +
> >  #define __def_gfpflag_names						\
> > -	{(__force unsigned long)GFP_TRANSHUGE,		"GFP_TRANSHUGE"},	\
> 
> Can't expand FUL here within the macro definition.

Can we do something even better?

#define GFP_NAME(flag) { (__force unsigned long)flag, #flag },

... with one or more layers of indirection to satisfy the arcane
rules of C macros?


  reply	other threads:[~2022-05-08 20:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8d627f02-183f-c4e7-7c15-77b2b438536b@openvz.org>
2022-05-06 20:38 ` [PATCH] percpu: improve percpu_alloc_percpu event trace kernel test robot
     [not found]   ` <e1c09bbb-2c58-a986-c704-1db538da905a@openvz.org>
     [not found]     ` <331d88fe-f4f7-657c-02a2-d977f15fbff6@openvz.org>
2022-05-07 19:37       ` [PATCH mm] tracing: incorrect gfp_t conversion Andrew Morton
     [not found]         ` <8b1cfefa-da7d-3376-cf04-1ff77dab8170@openvz.org>
2022-05-07 22:48           ` Andrew Morton
2022-05-07 23:00             ` Andrew Morton
2022-05-08 20:37               ` Matthew Wilcox [this message]
2022-05-08 20:51             ` Joe Perches
     [not found]               ` <8b9ba8ce-7376-2ef2-95f5-30e53cb46914@openvz.org>
2022-05-15 22:09                 ` [PATCH mm v2] " Steven Rostedt
2022-05-16 20:55                   ` Andrew Morton
2022-05-09 21:06     ` [PATCH] percpu: improve percpu_alloc_percpu event trace Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yngp/g2RYgnsdOJH@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=kernel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vvs@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox