From: Michael Ellerman <mpe@ellerman•id.au>
To: Anshuman Khandual <khandual@linux•vnet.ibm.com>
Cc: linuxppc-dev@ozlabs•org
Subject: Re: [PATCH] powerpc/xmon: Allow limiting the size of the paca display
Date: Wed, 12 Aug 2015 19:47:11 +1000 [thread overview]
Message-ID: <1439372831.24479.2.camel@ellerman.id.au> (raw)
In-Reply-To: <55CAFBC6.8060700@linux.vnet.ibm.com>
On Wed, 2015-08-12 at 13:24 +0530, Anshuman Khandual wrote:
> On 08/12/2015 12:27 PM, Michael Ellerman wrote:
> > @@ -2090,9 +2092,12 @@ static void dump_one_paca(int cpu)
> > printf(" %-*s = %s\n", 16, "present", cpu_present(cpu) ? "yes" : "no");
> > printf(" %-*s = %s\n", 16, "online", cpu_online(cpu) ? "yes" : "no");
> >
> > + i = 4; /* We always print the first four lines */
> > +
> > #define DUMP(paca, name, format) \
> > - printf(" %-*s = %#-*"format"\t(0x%lx)\n", 16, #name, 18, paca->name, \
> > - offsetof(struct paca_struct, name));
> > + if (!num_lines || i++ < num_lines)
>
> All look good except the fact that we are using 0 to signify that
> there is no limit to the number of lines. Is not it bit confusing ?
Maybe a bit, but it's the simplest option, and it's not uncommon for zero to
mean "no limit". chage(1) springs to mind as an example.
And in terms of xmon it's hardly the most confusing part :)
cheers
next prev parent reply other threads:[~2015-08-12 9:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 6:57 [PATCH] powerpc/xmon: Allow limiting the size of the paca display Michael Ellerman
2015-08-12 7:54 ` Anshuman Khandual
2015-08-12 9:47 ` Michael Ellerman [this message]
2015-08-12 11:55 ` [PATCH v2] " Michael Ellerman
2015-08-14 1:52 ` Sam Bobroff
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=1439372831.24479.2.camel@ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=khandual@linux$(echo .)vnet.ibm.com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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