diff options
| author | Michael Brown | 2005-04-16 19:09:52 +0200 |
|---|---|---|
| committer | Michael Brown | 2005-04-16 19:09:52 +0200 |
| commit | b7c55c3951d824b8289b20078ebce5945d4a2ae2 (patch) | |
| tree | c7a77e8d6b3fa97bdd17e1eef84839260d7d5962 /src/include | |
| parent | ...this time with the correct syntax. :( (diff) | |
| download | ipxe-b7c55c3951d824b8289b20078ebce5945d4a2ae2.tar.gz ipxe-b7c55c3951d824b8289b20078ebce5945d4a2ae2.tar.xz ipxe-b7c55c3951d824b8289b20078ebce5945d4a2ae2.zip | |
Avoid signed/unsigned warnings by explicitly making PCI_{BUS,DEV,FUNC}
all return unsigned quantities.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/pci.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/pci.h b/src/include/pci.h index d4e871d47..fd6ac9ba6 100644 --- a/src/include/pci.h +++ b/src/include/pci.h @@ -249,10 +249,10 @@ struct pci_device { uint8_t irq; uint8_t already_tried; }; -#define PCI_BUS(busdevfn) ( ( (busdevfn) >> 8 ) & 0xff ) -#define PCI_DEV(busdevfn) ( ( (busdevfn) >> 3 ) & 0x1f ) -#define PCI_FUNC(busdevfn) ( (busdevfn) & 0x07 ) -#define PCI_FN0(busdevfn) ( (busdevfn) & 0xfff8 ) +#define PCI_BUS(busdevfn) ( ( uint8_t ) ( ( (busdevfn) >> 8 ) & 0xff ) ) +#define PCI_DEV(busdevfn) ( ( uint8_t ) ( ( (busdevfn) >> 3 ) & 0x1f ) ) +#define PCI_FUNC(busdevfn) ( ( uint8_t ) ( (busdevfn) & 0x07 ) ) +#define PCI_FN0(busdevfn) ( ( uint16_t ) ( (busdevfn) & 0xfff8 ) ) /* * An individual PCI device identified by vendor and device IDs |
