From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57942 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjU2d-0000aY-VO for qemu-devel@nongnu.org; Thu, 12 Aug 2010 05:25:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OjU2c-00020o-SV for qemu-devel@nongnu.org; Thu, 12 Aug 2010 05:25:39 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:65159) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjU2c-00020Z-NS for qemu-devel@nongnu.org; Thu, 12 Aug 2010 05:25:38 -0400 Received: by pwi2 with SMTP id 2so359288pwi.4 for ; Thu, 12 Aug 2010 02:25:36 -0700 (PDT) Date: Thu, 12 Aug 2010 17:25:33 +0800 From: Ken CC Message-ID: <20100812092533.GA22091@kt> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] PCI: define max devices number on PCIBus as PCIBus_MAX_DEVICES in pci.h List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Ken CC --- hw/pci.c | 2 +- hw/pci.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index a98d6f3..a09fbac 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -44,7 +44,7 @@ struct PCIBus { pci_hotplug_fn hotplug; DeviceState *hotplug_qdev; void *irq_opaque; - PCIDevice *devices[256]; + PCIDevice *devices[PCIBUS_MAX_DEVICES]; PCIDevice *parent_dev; target_phys_addr_t mem_base; diff --git a/hw/pci.h b/hw/pci.h index 1eab7e7..5f6c85b 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -92,6 +92,7 @@ typedef struct PCIIORegion { #define PCI_ROM_SLOT 6 #define PCI_NUM_REGIONS 7 +#define PCIBUS_MAX_DEVICES 256 #include "pci_regs.h"