WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [rfc 04/18] ioemu: Remove lsi_scsi_init()s devfn parameter a

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [rfc 04/18] ioemu: Remove lsi_scsi_init()s devfn parameter as it is always passed as -1
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 17 Feb 2009 20:07:52 +1100
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Delivery-date: Tue, 17 Feb 2009 01:25:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20090217090748.580007796@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Index: ioemu-remote/hw/lsi53c895a.c
===================================================================
--- ioemu-remote.orig/hw/lsi53c895a.c   2009-02-12 15:36:30.000000000 +1100
+++ ioemu-remote/hw/lsi53c895a.c        2009-02-12 15:38:34.000000000 +1100
@@ -1858,12 +1858,12 @@ void lsi_scsi_attach(void *opaque, Block
         s->scsi_dev[id] = scsi_disk_init(bd, 1, lsi_command_complete, s);
 }
 
-void *lsi_scsi_init(PCIBus *bus, int devfn)
+void *lsi_scsi_init(PCIBus *bus)
 {
     LSIState *s;
 
     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: ioemu-remote/hw/pc.c
===================================================================
--- ioemu-remote.orig/hw/pc.c   2009-02-12 15:36:30.000000000 +1100
+++ ioemu-remote/hw/pc.c        2009-02-12 15:38:34.000000000 +1100
@@ -1128,7 +1128,7 @@ static void pc_init1(ram_addr_t ram_size
         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: ioemu-remote/hw/pci.h
===================================================================
--- ioemu-remote.orig/hw/pci.h  2009-02-12 15:36:30.000000000 +1100
+++ ioemu-remote/hw/pci.h       2009-02-12 15:38:34.000000000 +1100
@@ -125,7 +125,7 @@ void do_pci_del(char *devname);
 /* 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, DisplayState *ds, uint8_t *vga_ram_base,
Index: ioemu-remote/hw/realview.c
===================================================================
--- ioemu-remote.orig/hw/realview.c     2009-02-12 15:36:30.000000000 +1100
+++ ioemu-remote/hw/realview.c  2009-02-12 15:38:34.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: ioemu-remote/hw/versatilepb.c
===================================================================
--- ioemu-remote.orig/hw/versatilepb.c  2009-02-12 15:36:30.000000000 +1100
+++ ioemu-remote/hw/versatilepb.c       2009-02-12 15:38:34.000000000 +1100
@@ -213,7 +213,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)

-- 

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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>