Commit 82384670456d040126252f2e729138e834ecb472
1 parent
3dcd219f
Remove unused and misnamed field and variable
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Showing
2 changed files
with
0 additions
and
10 deletions
hw/pci.c
| @@ -54,7 +54,6 @@ static void pci_set_irq(void *opaque, int irq_num, int level); | @@ -54,7 +54,6 @@ static void pci_set_irq(void *opaque, int irq_num, int level); | ||
| 54 | target_phys_addr_t pci_mem_base; | 54 | target_phys_addr_t pci_mem_base; |
| 55 | static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_REDHAT_QUMRANET; | 55 | static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_REDHAT_QUMRANET; |
| 56 | static uint16_t pci_default_sub_device_id = PCI_SUBDEVICE_ID_QEMU; | 56 | static uint16_t pci_default_sub_device_id = PCI_SUBDEVICE_ID_QEMU; |
| 57 | -static int pci_irq_index; | ||
| 58 | static PCIBus *first_bus; | 57 | static PCIBus *first_bus; |
| 59 | 58 | ||
| 60 | static void pcibus_save(QEMUFile *f, void *opaque) | 59 | static void pcibus_save(QEMUFile *f, void *opaque) |
| @@ -245,9 +244,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, | @@ -245,9 +244,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, | ||
| 245 | PCIConfigReadFunc *config_read, | 244 | PCIConfigReadFunc *config_read, |
| 246 | PCIConfigWriteFunc *config_write) | 245 | PCIConfigWriteFunc *config_write) |
| 247 | { | 246 | { |
| 248 | - if (pci_irq_index >= PCI_DEVICES_MAX) | ||
| 249 | - return NULL; | ||
| 250 | - | ||
| 251 | if (devfn < 0) { | 247 | if (devfn < 0) { |
| 252 | for(devfn = bus->devfn_min ; devfn < 256; devfn += 8) { | 248 | for(devfn = bus->devfn_min ; devfn < 256; devfn += 8) { |
| 253 | if (!bus->devices[devfn]) | 249 | if (!bus->devices[devfn]) |
| @@ -268,7 +264,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, | @@ -268,7 +264,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, | ||
| 268 | config_write = pci_default_write_config; | 264 | config_write = pci_default_write_config; |
| 269 | pci_dev->config_read = config_read; | 265 | pci_dev->config_read = config_read; |
| 270 | pci_dev->config_write = config_write; | 266 | pci_dev->config_write = config_write; |
| 271 | - pci_dev->irq_index = pci_irq_index++; | ||
| 272 | bus->devices[devfn] = pci_dev; | 267 | bus->devices[devfn] = pci_dev; |
| 273 | pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4); | 268 | pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4); |
| 274 | return pci_dev; | 269 | return pci_dev; |
| @@ -322,7 +317,6 @@ int pci_unregister_device(PCIDevice *pci_dev) | @@ -322,7 +317,6 @@ int pci_unregister_device(PCIDevice *pci_dev) | ||
| 322 | pci_unregister_io_regions(pci_dev); | 317 | pci_unregister_io_regions(pci_dev); |
| 323 | 318 | ||
| 324 | qemu_free_irqs(pci_dev->irq); | 319 | qemu_free_irqs(pci_dev->irq); |
| 325 | - pci_irq_index--; | ||
| 326 | pci_dev->bus->devices[pci_dev->devfn] = NULL; | 320 | pci_dev->bus->devices[pci_dev->devfn] = NULL; |
| 327 | qdev_free(&pci_dev->qdev); | 321 | qdev_free(&pci_dev->qdev); |
| 328 | return 0; | 322 | return 0; |
hw/pci.h
| @@ -92,8 +92,6 @@ typedef struct PCIIORegion { | @@ -92,8 +92,6 @@ typedef struct PCIIORegion { | ||
| 92 | #define PCI_ROM_SLOT 6 | 92 | #define PCI_ROM_SLOT 6 |
| 93 | #define PCI_NUM_REGIONS 7 | 93 | #define PCI_NUM_REGIONS 7 |
| 94 | 94 | ||
| 95 | -#define PCI_DEVICES_MAX 64 | ||
| 96 | - | ||
| 97 | /* Declarations from linux/pci_regs.h */ | 95 | /* Declarations from linux/pci_regs.h */ |
| 98 | #define PCI_VENDOR_ID 0x00 /* 16 bits */ | 96 | #define PCI_VENDOR_ID 0x00 /* 16 bits */ |
| 99 | #define PCI_DEVICE_ID 0x02 /* 16 bits */ | 97 | #define PCI_DEVICE_ID 0x02 /* 16 bits */ |
| @@ -154,8 +152,6 @@ struct PCIDevice { | @@ -154,8 +152,6 @@ struct PCIDevice { | ||
| 154 | PCIConfigReadFunc *config_read; | 152 | PCIConfigReadFunc *config_read; |
| 155 | PCIConfigWriteFunc *config_write; | 153 | PCIConfigWriteFunc *config_write; |
| 156 | PCIUnregisterFunc *unregister; | 154 | PCIUnregisterFunc *unregister; |
| 157 | - /* ??? This is a PC-specific hack, and should be removed. */ | ||
| 158 | - int irq_index; | ||
| 159 | 155 | ||
| 160 | /* IRQ objects for the INTA-INTD pins. */ | 156 | /* IRQ objects for the INTA-INTD pins. */ |
| 161 | qemu_irq *irq; | 157 | qemu_irq *irq; |