[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1510070607.1000.23.camel@perches.com>
Date: Tue, 07 Nov 2017 08:03:27 -0800
From: Joe Perches <joe@...ches.com>
To: Michal Hocko <mhocko@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm/page_alloc: Avoid KERN_CONT uses in warn_alloc
On Tue, 2017-11-07 at 16:43 +0100, Michal Hocko wrote:
> On Tue 07-11-17 07:34:25, Joe Perches wrote:
[]
> > I believe, but have not tested, that using a specific width
> > as an argument to %*pb[l] will constrain the number of
> > spaces before the '(null)' output in any NULL pointer use.
> >
> > So how about a #define like
> >
> > /*
> > * nodemask_pr_args is only used with a "%*pb[l]" format for a nodemask.
> > * A NULL nodemask uses 6 to emit "(null)" without leading spaces.
> > */
> > #define nodemask_pr_args(maskp) \
> > (maskp) ? MAX_NUMNODES : 6, \
> > (maskp) ? (maskp)->bits : NULL
>
> Why not -1 then?
I believe it's the field width and not the precision that
needs to be set.
But if you test it and it works, then that's fine by me.
Powered by blists - more mailing lists