[coreboot] PCI register read/mod/write code
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Mon Oct 4 01:41:00 CEST 2010
On 04.10.2010 01:35, ron minnich wrote:
> On Sun, Oct 3, 2010 at 4:10 PM, Peter Stuge <peter at stuge.se> wrote:
>
>> Rudolf just found a bug in the sb700 code:
>>
>> u32 dword;
>> ..
>> dword = pci_read_config8(dev, 0x64);
>> dword |= 1 << 10;
>> pci_write_config8(dev, 0x64, dword);
>>
>>
>
> but why wouldn't the compiler warn about using a dword where a u8 is required?
>
>
> void pci_write_config8(device_t dev, unsigned where, uint8_t val)
>
> There's no warning of any kind?
>
Apparently enabling warnings will break compilation if I understood Uwe
correctly.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the coreboot
mailing list