[PULL 57/87] hw/i386/pc: Inline port92_init()

Paolo Bonzini posted 87 patches 5 years, 12 months ago
Maintainers: Richard Henderson <rth@twiddle.net>, Thomas Huth <thuth@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Sergio Lopez <slp@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, "Hervé Poussineau" <hpoussin@reactos.org>, Gerd Hoffmann <kraxel@redhat.com>, John Snow <jsnow@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Cornelia Huck <cohuck@redhat.com>, Christian Borntraeger <borntraeger@de.ibm.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Helge Deller <deller@gmx.de>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Anthony Perard <anthony.perard@citrix.com>, Halil Pasic <pasic@linux.ibm.com>, Paolo Bonzini <pbonzini@redhat.com>, Aleksandar Markovic <amarkovic@wavecomp.com>, Juan Quintela <quintela@redhat.com>, Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>, David Gibson <david@gibson.dropbear.id.au>, Paul Durrant <paul@xen.org>, "Cédric Le Goater" <clg@kaod.org>, David Hildenbrand <david@redhat.com>, Claudio Fontana <claudio.fontana@huawei.com>, James Hogan <jhogan@kernel.org>, Ben Warren <ben@skyportsystems.com>, Fam Zheng <fam@euphon.net>, Laurent Vivier <lvivier@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Jason Wang <jasowang@redhat.com>
[PULL 57/87] hw/i386/pc: Inline port92_init()
Posted by Paolo Bonzini 5 years, 12 months ago
From: Philippe Mathieu-Daudé <philmd@redhat.com>

This one-line function is not very helpful, so remove it
by inlining the call to qdev_connect_gpio_out_named().

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/pc.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 67fddcc..e36053f 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -710,11 +710,6 @@ static uint64_t port92_read(void *opaque, hwaddr addr,
     return ret;
 }
 
-static void port92_init(ISADevice *dev, qemu_irq a20_out)
-{
-    qdev_connect_gpio_out_named(DEVICE(dev), PORT92_A20_LINE, 0, a20_out);
-}
-
 static const VMStateDescription vmstate_port92_isa = {
     .name = "port92",
     .version_id = 1,
@@ -770,8 +765,8 @@ static void port92_class_initfn(ObjectClass *klass, void *data)
     dc->vmsd = &vmstate_port92_isa;
     /*
      * Reason: unlike ordinary ISA devices, this one needs additional
-     * wiring: its A20 output line needs to be wired up by
-     * port92_init().
+     * wiring: its A20 output line needs to be wired up with
+     * qdev_connect_gpio_out_named().
      */
     dc->user_creatable = false;
 }
@@ -1282,7 +1277,8 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl, bool no_vmport)
 
     a20_line = qemu_allocate_irqs(handle_a20_line_change, first_cpu, 2);
     i8042_setup_a20_line(i8042, a20_line[0]);
-    port92_init(port92, a20_line[1]);
+    qdev_connect_gpio_out_named(DEVICE(port92),
+                                PORT92_A20_LINE, 0, a20_line[1]);
     g_free(a20_line);
 }
 
-- 
1.8.3.1