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

Segher Boessenkool segher at kernel.crashing.org
Fri Oct 6 21:26:25 EST 2006


> +static unsigned int u4_pcie_cfa0(u8 devfn, u8 off)

"off" should be bigger than u8...

> +{
> +	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.

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


Segher





More information about the Linuxppc-dev mailing list