qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [patch 1/5] ioemu: Remove lsi_scsi_init()s devfn parameter


From: Simon Horman
Subject: [Qemu-devel] [patch 1/5] ioemu: Remove lsi_scsi_init()s devfn parameter as it is always passed as -1
Date: Mon, 23 Feb 2009 20:18:11 +1100
User-agent: quilt/0.46-1

Signed-off-by: Simon Horman <address@hidden>

Index: qemu/hw/lsi53c895a.c
===================================================================
--- qemu.orig/hw/lsi53c895a.c   2009-02-23 18:33:24.000000000 +1100
+++ qemu/hw/lsi53c895a.c        2009-02-23 18:33:29.000000000 +1100
@@ -1974,13 +1974,13 @@ static int lsi_scsi_uninit(PCIDevice *d)
     return 0;
 }
 
-void *lsi_scsi_init(PCIBus *bus, int devfn)
+void *lsi_scsi_init(PCIBus *bus)
 {
     LSIState *s;
     uint8_t *pci_conf;
 
     s = (LSIState *)pci_register_device(bus, "LSI53C895A SCSI HBA",
-                                        sizeof(*s), devfn, NULL, NULL);
+                                        sizeof(*s), -1, NULL, NULL);
     if (s == NULL) {
         fprintf(stderr, "lsi-scsi: Failed to register PCI device\n");
         return NULL;
Index: qemu/hw/pc.c
===================================================================
--- qemu.orig/hw/pc.c   2009-02-23 18:33:24.000000000 +1100
+++ qemu/hw/pc.c        2009-02-23 18:33:29.000000000 +1100
@@ -1078,7 +1078,7 @@ vga_bios_error:
         max_bus = drive_get_max_bus(IF_SCSI);
 
        for (bus = 0; bus <= max_bus; bus++) {
-            scsi = lsi_scsi_init(pci_bus, -1);
+            scsi = lsi_scsi_init(pci_bus);
             for (unit = 0; unit < LSI_MAX_DEVS; unit++) {
                index = drive_get_index(IF_SCSI, bus, unit);
                if (index == -1)
Index: qemu/hw/pci.h
===================================================================
--- qemu.orig/hw/pci.h  2009-02-23 18:33:24.000000000 +1100
+++ qemu/hw/pci.h       2009-02-23 18:33:29.000000000 +1100
@@ -263,7 +263,7 @@ pci_config_set_class(uint8_t *pci_config
 /* lsi53c895a.c */
 #define LSI_MAX_DEVS 7
 void lsi_scsi_attach(void *opaque, BlockDriverState *bd, int id);
-void *lsi_scsi_init(PCIBus *bus, int devfn);
+void *lsi_scsi_init(PCIBus *bus);
 
 /* vmware_vga.c */
 void pci_vmsvga_init(PCIBus *bus, uint8_t *vga_ram_base,
Index: qemu/hw/realview.c
===================================================================
--- qemu.orig/hw/realview.c     2009-02-23 18:33:24.000000000 +1100
+++ qemu/hw/realview.c  2009-02-23 18:33:29.000000000 +1100
@@ -112,7 +112,7 @@ static void realview_init(ram_addr_t ram
         fprintf(stderr, "qemu: too many SCSI bus\n");
         exit(1);
     }
-    scsi_hba = lsi_scsi_init(pci_bus, -1);
+    scsi_hba = lsi_scsi_init(pci_bus);
     for (n = 0; n < LSI_MAX_DEVS; n++) {
         index = drive_get_index(IF_SCSI, 0, n);
         if (index == -1)
Index: qemu/hw/versatilepb.c
===================================================================
--- qemu.orig/hw/versatilepb.c  2009-02-23 18:33:24.000000000 +1100
+++ qemu/hw/versatilepb.c       2009-02-23 18:33:29.000000000 +1100
@@ -207,7 +207,7 @@ static void versatile_init(ram_addr_t ra
         fprintf(stderr, "qemu: too many SCSI bus\n");
         exit(1);
     }
-    scsi_hba = lsi_scsi_init(pci_bus, -1);
+    scsi_hba = lsi_scsi_init(pci_bus);
     for (n = 0; n < LSI_MAX_DEVS; n++) {
         index = drive_get_index(IF_SCSI, 0, n);
         if (index == -1)
Index: qemu/hw/pci-hotplug.c
===================================================================
--- qemu.orig/hw/pci-hotplug.c  2009-02-23 18:33:36.000000000 +1100
+++ qemu/hw/pci-hotplug.c       2009-02-23 18:33:43.000000000 +1100
@@ -112,7 +112,7 @@ static PCIDevice *qemu_pci_hot_add_stora
 
     switch (type) {
     case IF_SCSI:
-        opaque = lsi_scsi_init (pci_bus, -1);
+        opaque = lsi_scsi_init (pci_bus);
         if (opaque && drive_idx >= 0)
             lsi_scsi_attach (opaque, drives_table[drive_idx].bdrv,
                              drives_table[drive_idx].unit);

-- 

-- 
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en





reply via email to

[Prev in Thread] Current Thread [Next in Thread]