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

Ingo Molnar mingo@elte.hu
Tue Jun 2 05:10:00 GMT 2009


* 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



More information about the Systemtap mailing list