[PATCH 1/1] arch/powerpc: Rework local_paca to avoid LTO warnings

Andrew Donnellan andrew.donnellan at au1.ibm.com
Thu Mar 14 11:09:42 AEDT 2019


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 at au1.ibm.com  IBM Australia Limited



More information about the Linuxppc-dev mailing list