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.

Reply via email to