Re: [PATCH -tip v8 5/7] x86: add pt_regs register and stack access APIs

Ingo Molnar
2009-06-01T23:40:39Z

* 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