Fix obviously wrong boundary checks + cleanup unused vars.
Also disable compilation of code that is no longer used anywhere in the whole Xserver tree.
This commit is contained in:
parent
5afc6c1a14
commit
072c022e73
|
@ -149,11 +149,10 @@ int lnxPciInit(void) {
|
||||||
Bool
|
Bool
|
||||||
xf86GetPciSizeFromOS(PCITAG tag, int index, int* bits)
|
xf86GetPciSizeFromOS(PCITAG tag, int index, int* bits)
|
||||||
{
|
{
|
||||||
unsigned int dev, fn;
|
|
||||||
signed PCIADDR_TYPE Size;
|
signed PCIADDR_TYPE Size;
|
||||||
struct pci_dev *device;
|
struct pci_dev *device;
|
||||||
|
|
||||||
if (index > 7)
|
if (index >= 7)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!xf86OSLinuxPCIDevs) {
|
if (!xf86OSLinuxPCIDevs) {
|
||||||
|
@ -181,14 +180,14 @@ xf86GetPciSizeFromOS(PCITAG tag, int index, int* bits)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* Query the kvirt address (64bit) of a BAR range from TAG */
|
/* Query the kvirt address (64bit) of a BAR range from TAG */
|
||||||
Bool
|
Bool
|
||||||
xf86GetPciOffsetFromOS(PCITAG tag, int index, unsigned long* bases)
|
xf86GetPciOffsetFromOS(PCITAG tag, int index, unsigned long* bases)
|
||||||
{
|
{
|
||||||
unsigned int dev, fn;
|
|
||||||
struct pci_dev *device;
|
struct pci_dev *device;
|
||||||
|
|
||||||
if (index > 7)
|
if (index >= 7)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!xf86OSLinuxPCIDevs) {
|
if (!xf86OSLinuxPCIDevs) {
|
||||||
|
@ -208,12 +207,12 @@ xf86GetPciOffsetFromOS(PCITAG tag, int index, unsigned long* bases)
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Query the kvirt address (64bit) of a BAR range from size for a given TAG */
|
/* Query the kvirt address (64bit) of a BAR range from size for a given TAG */
|
||||||
unsigned long
|
unsigned long
|
||||||
xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base)
|
xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base)
|
||||||
{
|
{
|
||||||
unsigned int dev, fn;
|
|
||||||
unsigned int ndx;
|
unsigned int ndx;
|
||||||
struct pci_dev *device;
|
struct pci_dev *device;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue