Browse Source

Avoid signed/unsigned warnings by explicitly making PCI_{BUS,DEV,FUNC}

all return unsigned quantities.
tags/v0.9.3
Michael Brown 19 years ago
parent
commit
b7c55c3951
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      src/include/pci.h

+ 4
- 4
src/include/pci.h View File

@@ -249,10 +249,10 @@ struct pci_device {
249 249
 	uint8_t			irq;
250 250
 	uint8_t			already_tried;
251 251
 };
252
-#define PCI_BUS(busdevfn)	( ( (busdevfn) >> 8 ) & 0xff )
253
-#define PCI_DEV(busdevfn)	( ( (busdevfn) >> 3 ) & 0x1f )
254
-#define PCI_FUNC(busdevfn)      ( (busdevfn) & 0x07 )
255
-#define PCI_FN0(busdevfn)	( (busdevfn) & 0xfff8 )
252
+#define PCI_BUS(busdevfn)	( ( uint8_t ) ( ( (busdevfn) >> 8 ) & 0xff ) )
253
+#define PCI_DEV(busdevfn)	( ( uint8_t ) ( ( (busdevfn) >> 3 ) & 0x1f ) )
254
+#define PCI_FUNC(busdevfn)      ( ( uint8_t ) ( (busdevfn) & 0x07 ) )
255
+#define PCI_FN0(busdevfn)	( ( uint16_t ) ( (busdevfn) & 0xfff8 ) )
256 256
 
257 257
 /*
258 258
  * An individual PCI device identified by vendor and device IDs

Loading…
Cancel
Save