[PATCH] hw/arm, hw/ppc: Remove unnecessary audio.h includes from board code

Peter Maydell posted 1 patch 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260417093805.1076954-1-peter.maydell@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Jan Kiszka <jan.kiszka@web.de>, Alistair Francis <alistair@alistair23.me>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, "Hervé Poussineau" <hpoussin@reactos.org>
hw/arm/integratorcp.c | 1 -
hw/arm/musicpal.c     | 1 -
hw/arm/realview.c     | 1 -
hw/arm/versatilepb.c  | 1 -
hw/arm/vexpress.c     | 1 -
hw/arm/xlnx-zcu102.c  | 1 -
hw/ppc/prep.c         | 1 -
7 files changed, 7 deletions(-)
[PATCH] hw/arm, hw/ppc: Remove unnecessary audio.h includes from board code
Posted by Peter Maydell 1 month, 1 week ago
Some boards (mostly arm, but also ppc/prep) include audio.h, but they
don't need anything from it.  Drop the unnecessary include lines.

These seem to have been introduced with commits 2b16397264a8e,
b8ab0303de, which added the machine-default audiodev handling, but as
far as I can tell they were unecessary right from the start, as the
machine_add_audiodev_property() function has always been in boards.h.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/integratorcp.c | 1 -
 hw/arm/musicpal.c     | 1 -
 hw/arm/realview.c     | 1 -
 hw/arm/versatilepb.c  | 1 -
 hw/arm/vexpress.c     | 1 -
 hw/arm/xlnx-zcu102.c  | 1 -
 hw/ppc/prep.c         | 1 -
 7 files changed, 7 deletions(-)

diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index 0bf519b6bb..03633f3d4f 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -27,7 +27,6 @@
 #include "hw/core/irq.h"
 #include "hw/sd/sd.h"
 #include "qom/object.h"
-#include "qemu/audio.h"
 #include "target/arm/cpu-qom.h"
 
 #define TYPE_INTEGRATOR_CM "integrator_core"
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 250fdb49b6..441a11100a 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -37,7 +37,6 @@
 #include "qemu/cutils.h"
 #include "qom/object.h"
 #include "hw/net/mv88w8618_eth.h"
-#include "qemu/audio.h"
 #include "qemu/error-report.h"
 #include "target/arm/cpu-qom.h"
 
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index c9558be4d4..e9c19e7e6e 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -30,7 +30,6 @@
 #include "hw/core/irq.h"
 #include "hw/i2c/arm_sbcon_i2c.h"
 #include "hw/sd/sd.h"
-#include "qemu/audio.h"
 #include "target/arm/cpu-qom.h"
 
 #define SMP_BOOT_ADDR 0xe0000000
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index 254b1610b3..c6991a52e6 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -26,7 +26,6 @@
 #include "hw/char/pl011.h"
 #include "hw/sd/sd.h"
 #include "qom/object.h"
-#include "qemu/audio.h"
 #include "target/arm/cpu-qom.h"
 #include "qemu/log.h"
 
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index cc6ae7d4c4..b178798085 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -45,7 +45,6 @@
 #include "hw/sd/sd.h"
 #include "qobject/qlist.h"
 #include "qom/object.h"
-#include "qemu/audio.h"
 #include "target/arm/cpu-qom.h"
 
 #define VEXPRESS_BOARD_ID 0x8e0
diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
index 3ba2736bab..4e48970274 100644
--- a/hw/arm/xlnx-zcu102.c
+++ b/hw/arm/xlnx-zcu102.c
@@ -26,7 +26,6 @@
 #include "system/device_tree.h"
 #include "qom/object.h"
 #include "net/can_emu.h"
-#include "qemu/audio.h"
 
 struct XlnxZCU102 {
     MachineState parent_obj;
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index e973b34099..2672eb9e7a 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -46,7 +46,6 @@
 #include "trace.h"
 #include "elf.h"
 #include "qemu/units.h"
-#include "qemu/audio.h"
 
 /* SMP is not enabled, for now */
 #define MAX_CPUS 1
-- 
2.43.0
Re: [PATCH] hw/arm, hw/ppc: Remove unnecessary audio.h includes from board code
Posted by Philippe Mathieu-Daudé 1 month ago
On 17/4/26 11:38, Peter Maydell wrote:
> Some boards (mostly arm, but also ppc/prep) include audio.h, but they
> don't need anything from it.  Drop the unnecessary include lines.
> 
> These seem to have been introduced with commits 2b16397264a8e,
> b8ab0303de, which added the machine-default audiodev handling, but as
> far as I can tell they were unecessary right from the start, as the
> machine_add_audiodev_property() function has always been in boards.h.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   hw/arm/integratorcp.c | 1 -
>   hw/arm/musicpal.c     | 1 -
>   hw/arm/realview.c     | 1 -
>   hw/arm/versatilepb.c  | 1 -
>   hw/arm/vexpress.c     | 1 -
>   hw/arm/xlnx-zcu102.c  | 1 -
>   hw/ppc/prep.c         | 1 -
>   7 files changed, 7 deletions(-)

Patch queued, thanks.
Re: [PATCH] hw/arm, hw/ppc: Remove unnecessary audio.h includes from board code
Posted by Alex Bennée 1 month, 1 week ago
Peter Maydell <peter.maydell@linaro.org> writes:

> Some boards (mostly arm, but also ppc/prep) include audio.h, but they
> don't need anything from it.  Drop the unnecessary include lines.
>
> These seem to have been introduced with commits 2b16397264a8e,
> b8ab0303de, which added the machine-default audiodev handling, but as
> far as I can tell they were unecessary right from the start, as the
> machine_add_audiodev_property() function has always been in boards.h.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro