mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 17:12:40 +03:00
Avoid signed/unsigned warnings by explicitly making PCI_{BUS,DEV,FUNC}
all return unsigned quantities.
This commit is contained in:
@@ -249,10 +249,10 @@ struct pci_device {
|
|||||||
uint8_t irq;
|
uint8_t irq;
|
||||||
uint8_t already_tried;
|
uint8_t already_tried;
|
||||||
};
|
};
|
||||||
#define PCI_BUS(busdevfn) ( ( (busdevfn) >> 8 ) & 0xff )
|
#define PCI_BUS(busdevfn) ( ( uint8_t ) ( ( (busdevfn) >> 8 ) & 0xff ) )
|
||||||
#define PCI_DEV(busdevfn) ( ( (busdevfn) >> 3 ) & 0x1f )
|
#define PCI_DEV(busdevfn) ( ( uint8_t ) ( ( (busdevfn) >> 3 ) & 0x1f ) )
|
||||||
#define PCI_FUNC(busdevfn) ( (busdevfn) & 0x07 )
|
#define PCI_FUNC(busdevfn) ( ( uint8_t ) ( (busdevfn) & 0x07 ) )
|
||||||
#define PCI_FN0(busdevfn) ( (busdevfn) & 0xfff8 )
|
#define PCI_FN0(busdevfn) ( ( uint16_t ) ( (busdevfn) & 0xfff8 ) )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* An individual PCI device identified by vendor and device IDs
|
* An individual PCI device identified by vendor and device IDs
|
||||||
|
|||||||
Reference in New Issue
Block a user