diff mbox series

[1/7] hw/isa: Un-inline isa_bus_from_device()

Message ID 20230208000743.79415-2-philmd@linaro.org
State New
Headers show
Series hw/ide: Untangle ISA/PCI abuses of ide_init_ioport() | expand

Commit Message

Philippe Mathieu-Daudé Feb. 8, 2023, 12:07 a.m. UTC
No point in inlining isa_bus_from_device() which is only
used at device realization time.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/isa/isa-bus.c     | 5 +++++
 include/hw/isa/isa.h | 5 +----
 2 files changed, 6 insertions(+), 4 deletions(-)

Comments

Richard Henderson Feb. 8, 2023, 7:27 p.m. UTC | #1
On 2/7/23 14:07, Philippe Mathieu-Daudé wrote:
> No point in inlining isa_bus_from_device() which is only
> used at device realization time.
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   hw/isa/isa-bus.c     | 5 +++++
>   include/hw/isa/isa.h | 5 +----
>   2 files changed, 6 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index 4fe61d6dfe..5bd99379e9 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -162,6 +162,11 @@  bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp)
     return qdev_realize_and_unref(&dev->parent_obj, &bus->parent_obj, errp);
 }
 
+ISABus *isa_bus_from_device(ISADevice *dev)
+{
+    return ISA_BUS(qdev_get_parent_bus(DEVICE(dev)));
+}
+
 ISADevice *isa_vga_init(ISABus *bus)
 {
     vga_interface_created = true;
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index 25acd5c34c..ad8bdd941f 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -123,9 +123,6 @@  int isa_register_portio_list(ISADevice *dev,
                              const MemoryRegionPortio *portio,
                              void *opaque, const char *name);
 
-static inline ISABus *isa_bus_from_device(ISADevice *d)
-{
-    return ISA_BUS(qdev_get_parent_bus(DEVICE(d)));
-}
+ISABus *isa_bus_from_device(ISADevice *dev);
 
 #endif