Messages in this thread | | | Subject | Re: [PATCH 1/1] arch/powerpc: Rework local_paca to avoid LTO warnings | From | Andrew Donnellan <> | Date | Thu, 14 Mar 2019 11:09:42 +1100 |
| |
On 14/3/19 10:54 am, Daniel Axtens wrote: >> +static inline struct paca_struct *get_paca_no_preempt_check(void) >> +{ >> + register struct paca_struct *paca asm("r13"); >> + return paca; >> +} > > Isn't the convention to have the { on the same line as the function, or > am I horrible mis-remembering things?
However, there is one special case, namely functions: they have the opening brace at the beginning of the next line, thus:
int function(int x) { body of function }
Heretic people all over the world have claimed that this inconsistency is ... well ... inconsistent, but all right-thinking people know that (a) K&R are **right** and (b) K&R are right. Besides, functions are special anyway (you can't nest them in C).
-- Andrew Donnellan OzLabs, ADL Canberra andrew.donnellan@au1.ibm.com IBM Australia Limited
| |