[PATCH] powerpc: make U4 PCIe work (#2)
Segher Boessenkool
segher at kernel.crashing.org
Sat Oct 7 08:37:05 EST 2006
>>> +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...
Ah right, because of the explicit cast. Get rid of it :-)
>> 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