This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip v8 5/7] x86: add pt_regs register and stack access APIs
- From: Ingo Molnar <mingo at elte dot hu>
- To: Christoph Hellwig <hch at infradead dot org>
- Cc: Masami Hiramatsu <mhiramat at redhat dot com>, Steven Rostedt <rostedt at goodmis dot org>, lkml <linux-kernel at vger dot kernel dot org>, systemtap <systemtap at sources dot redhat dot com>, kvm <kvm at vger dot kernel dot org>, DLE <dle-develop at lists dot sourceforge dot net>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Frederic Weisbecker <fweisbec at gmail dot com>, Roland McGrath <roland at redhat dot com>, linux-arch at vger dot kernel dot org
- Date: Tue, 2 Jun 2009 01:40:06 +0200
- Subject: Re: [PATCH -tip v8 5/7] x86: add pt_regs register and stack access APIs
- References: <20090529000326.17532.70868.stgit@localhost.localdomain> <20090529000347.17532.34038.stgit@localhost.localdomain> <20090530081303.GB15755@infradead.org>
* Christoph Hellwig <hch@infradead.org> wrote:
> > + if (n < NR_REGPARMS) {
> > + switch (n) {
> > + case 0: return regs->ax;
> > + case 1: return regs->dx;
> > + case 2: return regs->cx;
> > + }
>
> Normal kernel style would be
>
> switch (n) {
> case 0:
> return regs->ax;
> case 1:
> return regs->dx;
> case 2:
> return regs->cx;
> }
the original single-line shortcut is acceptable too.
Ingo