pci: fix warnings on header

This commit is contained in:
Matheus
2023-02-04 00:25:20 -03:00
parent a6f37a6a85
commit fae8fa47b2
+3 -3
View File
@@ -65,7 +65,7 @@ typedef struct _pci_enumeration{
msixmsg_t* table; msixmsg_t* table;
int entrycount; int entrycount;
} msix; } msix;
} };
} pci_enumeration; } pci_enumeration;
@@ -95,9 +95,9 @@ static inline void* getbarmemaddr(pci_deviceheader* e, int bar){
return NULL; return NULL;
if(type & PCI_MEM_64) if(type & PCI_MEM_64)
return (e->BAR[bar] & ~(0xF)) + ((uint64_t)e->BAR[bar + 1] << 32); return (void*)(((uint64_t)e->BAR[bar] & ~(0xF)) + ((uint64_t)e->BAR[bar + 1] << 32));
else else
return e->BAR[bar] & ~(0xF); return (void*)((uint64_t)e->BAR[bar] & ~(0xF));
} }
#define PCI_COMMAND_IO 1 #define PCI_COMMAND_IO 1