[PATCH 1/3] powerpc/powernv/pci: Reduce spam when dumping PEST

Andrew Donnellan andrew.donnellan at au1.ibm.com
Wed May 31 11:31:04 AEST 2017


On 30/05/17 21:28, Michael Ellerman wrote:
> You and a few other people who are also wrong ;)
>
> Using PPC_BIT() means people have to go and dereference that macro
> before they can grok the code, and when they do look at the macro they
> go "huh, wut is this insanity".

Any non-PPC person who's looking in EEH code is in for a fun time anyway :)

> Having said that I don't love the use of >> 63 here. Better would be:
>
> #define PE_MASK	(1ull << 63)	// Name could be better if I knew what this code was doing
>
> if (peA & PE_MASK)
> 	...
>
>
> Even better IMHO is to fully flesh out the constant:
>
> #define PE_MASK	0x8000000000000000

Agreed, I just don't like seeing >> being used of extracting a bit.

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Linuxppc-dev mailing list