[PATCH] powerpc: make U4 PCIe work (#2)

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Oct 7 07:29:02 EST 2006


On Fri, 2006-10-06 at 13:26 +0200, Segher Boessenkool wrote:
> > +static unsigned int u4_pcie_cfa0(u8 devfn, u8 off)
> 
> "off" should be bigger than u8...

Right

> > +{
> > +	return (1 << ((unsigned int)PCI_SLOT(devfn))) 	|
> > +		(((unsigned int)PCI_FUNC(devfn)) << 8) |
> > +		((((unsigned int)(off)) >> 8) << 28) 	|
> 
> ...and the compiler told you about that here.

No it didn't...

> Make the parameters and return value all u32 and you won't
> need casts anymore, the function call will implicitly do it.

Ben.





More information about the Linuxppc-dev mailing list