qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: qemu-devel <qemu-devel@nongnu.org>
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	[thread overview]
Message-ID: <20090223092901.405754927@vergenet.net> (raw)
In-Reply-To: 20090223091810.891526738@vergenet.net

[-- Attachment #1: qemu-lsi_scsi_init-no-devfn-arg.patch --]
[-- Type: text/plain, Size: 3768 bytes --]

Signed-off-by: Simon Horman <horms@verge.net.au>

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	other threads:[~2009-02-23  9:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-23  9:18 [Qemu-devel] [patch 0/5] PCI clean-up Simon Horman
2009-02-23  9:18 ` Simon Horman [this message]
2009-02-23  9:18 ` [Qemu-devel] [patch 2/5] ioemu: Remove lsi_scsi_init()s devfn parameter as it is always passed as -1 Simon Horman
2009-02-23  9:18 ` [Qemu-devel] [patch 3/5] ioemu: Remove usb_ohci_init*()s devfn parameter as they are " Simon Horman
2009-02-23  9:18 ` [Qemu-devel] [patch 4/5] iommu: Define PCI_DEVFN_AUTO and use it Simon Horman
2009-02-23  9:18 ` [Qemu-devel] [patch 5/5] iommu: Use PCI_DEVFN, PCI_SLOT and PCI_FUNC Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090223092901.405754927@vergenet.net \
    --to=horms@verge.net.au \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).