* [PATCH v2 0/3] hw/ide: Make "ide_internal.h" really internal
@ 2024-02-25 17:16 Philippe Mathieu-Daudé
2024-02-25 17:16 ` [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs() Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-25 17:16 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Leif Lindholm, Marcin Juszkiewicz, BALATON Zoltan,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland, Philippe Mathieu-Daudé
Since v1:
- Remove use of "ahci_internal.h" in SBSA-Ref
- Rename "internal.h" -> "ide_internal.h"
Supersedes: <20240223142633.933694E6004@zero.eik.bme.hu>
BALATON Zoltan (1):
hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/
Philippe Mathieu-Daudé (2):
hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs()
hw/ide: Include 'ide_internal.h' from current path
hw/ide/ahci_internal.h | 2 +-
include/hw/ide/internal.h => hw/ide/ide_internal.h | 0
include/hw/misc/macio/macio.h | 2 +-
hw/arm/sbsa-ref.c | 11 ++---------
hw/ide/ahci.c | 2 +-
hw/ide/atapi.c | 2 +-
hw/ide/cmd646.c | 2 +-
hw/ide/core.c | 2 +-
hw/ide/ide-bus.c | 2 +-
hw/ide/ide-dev.c | 2 +-
hw/ide/ioport.c | 2 +-
hw/ide/isa.c | 2 +-
hw/ide/macio.c | 2 +-
hw/ide/microdrive.c | 2 +-
hw/ide/mmio.c | 2 +-
hw/ide/pci.c | 2 +-
hw/ide/piix.c | 2 +-
hw/ide/sii3112.c | 2 +-
hw/ide/via.c | 2 +-
19 files changed, 19 insertions(+), 26 deletions(-)
rename include/hw/ide/internal.h => hw/ide/ide_internal.h (100%)
--
2.41.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs()
2024-02-25 17:16 [PATCH v2 0/3] hw/ide: Make "ide_internal.h" really internal Philippe Mathieu-Daudé
@ 2024-02-25 17:16 ` Philippe Mathieu-Daudé
2024-02-25 17:21 ` Philippe Mathieu-Daudé
2024-02-25 17:16 ` [PATCH v2 2/3] hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/ Philippe Mathieu-Daudé
2024-02-25 17:16 ` [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path Philippe Mathieu-Daudé
2 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-25 17:16 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Leif Lindholm, Marcin Juszkiewicz, BALATON Zoltan,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland, Philippe Mathieu-Daudé
Use ahci_ide_create_devs() instead of open-coding it.
Not accessing AHCIDevice internals anymore allows to
remove "hw/ide/ahci_internal.h" (which isn't really a
public header).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/arm/sbsa-ref.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 5d3a574664..995c7be23e 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -37,7 +37,6 @@
#include "hw/block/flash.h"
#include "hw/boards.h"
#include "hw/ide/internal.h"
-#include "hw/ide/ahci_internal.h"
#include "hw/ide/ahci-sysbus.h"
#include "hw/intc/arm_gicv3_common.h"
#include "hw/intc/arm_gicv3_its_common.h"
@@ -572,7 +571,6 @@ static void create_ahci(const SBSAMachineState *sms)
DriveInfo *hd[NUM_SATA_PORTS];
SysbusAHCIState *sysahci;
AHCIState *ahci;
- int i;
dev = qdev_new("sysbus-ahci");
qdev_prop_set_uint32(dev, "num-ports", NUM_SATA_PORTS);
@@ -583,12 +581,7 @@ static void create_ahci(const SBSAMachineState *sms)
sysahci = SYSBUS_AHCI(dev);
ahci = &sysahci->ahci;
ide_drive_get(hd, ARRAY_SIZE(hd));
- for (i = 0; i < ahci->ports; i++) {
- if (hd[i] == NULL) {
- continue;
- }
- ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]);
- }
+ ahci_ide_create_devs(ahci, hd);
}
static void create_xhci(const SBSAMachineState *sms)
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 2/3] hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/
2024-02-25 17:16 [PATCH v2 0/3] hw/ide: Make "ide_internal.h" really internal Philippe Mathieu-Daudé
2024-02-25 17:16 ` [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs() Philippe Mathieu-Daudé
@ 2024-02-25 17:16 ` Philippe Mathieu-Daudé
2024-02-25 17:16 ` [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path Philippe Mathieu-Daudé
2 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-25 17:16 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Leif Lindholm, Marcin Juszkiewicz, BALATON Zoltan,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland, Philippe Mathieu-Daudé,
Thomas Huth
From: BALATON Zoltan <balaton@eik.bme.hu>
Remove last two includes of hw/ide/intarnal.h outside of hw/ide and
replace them with newly added public header to allow moving internal.h
into hw/ide to really stop exposing it.
Fixes: a11f439a0e (hw/ide: Stop exposing internal.h to non-IDE files)
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20240223142633.933694E6004@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
{include/hw => hw}/ide/internal.h | 0
include/hw/misc/macio/macio.h | 2 +-
hw/arm/sbsa-ref.c | 2 +-
3 files changed, 2 insertions(+), 2 deletions(-)
rename {include/hw => hw}/ide/internal.h (100%)
diff --git a/include/hw/ide/internal.h b/hw/ide/internal.h
similarity index 100%
rename from include/hw/ide/internal.h
rename to hw/ide/internal.h
diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h
index 86df2c2b60..2b54da6b31 100644
--- a/include/hw/misc/macio/macio.h
+++ b/include/hw/misc/macio/macio.h
@@ -28,7 +28,7 @@
#include "hw/char/escc.h"
#include "hw/pci/pci_device.h"
-#include "hw/ide/internal.h"
+#include "hw/ide/ide-bus.h"
#include "hw/intc/heathrow_pic.h"
#include "hw/misc/macio/cuda.h"
#include "hw/misc/macio/gpio.h"
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 995c7be23e..aa1eeecc94 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -36,7 +36,7 @@
#include "hw/arm/smmuv3.h"
#include "hw/block/flash.h"
#include "hw/boards.h"
-#include "hw/ide/internal.h"
+#include "hw/ide/ide-bus.h"
#include "hw/ide/ahci-sysbus.h"
#include "hw/intc/arm_gicv3_common.h"
#include "hw/intc/arm_gicv3_its_common.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
2024-02-25 17:16 [PATCH v2 0/3] hw/ide: Make "ide_internal.h" really internal Philippe Mathieu-Daudé
2024-02-25 17:16 ` [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs() Philippe Mathieu-Daudé
2024-02-25 17:16 ` [PATCH v2 2/3] hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/ Philippe Mathieu-Daudé
@ 2024-02-25 17:16 ` Philippe Mathieu-Daudé
2024-02-25 20:28 ` BALATON Zoltan
2 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-25 17:16 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Leif Lindholm, Marcin Juszkiewicz, BALATON Zoltan,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland, Philippe Mathieu-Daudé
Rename "internal.h" as "ide_internal.h", and include
it via its relative local path, instead of absolute
to the project root path.
Mechanical patch doing:
$ sed -i -e 's#hw/ide/internal.h#ide_internal.h#' \
$(git grep -l hw/ide/internal)
$ git mv hw/ide/internal.h hw/ide/ide_internal.h
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ide/ahci_internal.h | 2 +-
hw/ide/{internal.h => ide_internal.h} | 0
hw/ide/ahci.c | 2 +-
hw/ide/atapi.c | 2 +-
hw/ide/cmd646.c | 2 +-
hw/ide/core.c | 2 +-
hw/ide/ide-bus.c | 2 +-
hw/ide/ide-dev.c | 2 +-
hw/ide/ioport.c | 2 +-
hw/ide/isa.c | 2 +-
hw/ide/macio.c | 2 +-
hw/ide/microdrive.c | 2 +-
hw/ide/mmio.c | 2 +-
hw/ide/pci.c | 2 +-
hw/ide/piix.c | 2 +-
hw/ide/sii3112.c | 2 +-
hw/ide/via.c | 2 +-
17 files changed, 16 insertions(+), 16 deletions(-)
rename hw/ide/{internal.h => ide_internal.h} (100%)
diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h
index 4e13329bb2..34f3d50ca9 100644
--- a/hw/ide/ahci_internal.h
+++ b/hw/ide/ahci_internal.h
@@ -25,7 +25,7 @@
#define HW_IDE_AHCI_INTERNAL_H
#include "hw/ide/ahci.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "hw/pci/pci_device.h"
#define AHCI_MEM_BAR_SIZE 0x1000
diff --git a/hw/ide/internal.h b/hw/ide/ide_internal.h
similarity index 100%
rename from hw/ide/internal.h
rename to hw/ide/ide_internal.h
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 54c9685495..c2af344ac5 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -34,7 +34,7 @@
#include "qemu/module.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "hw/ide/pci.h"
#include "hw/ide/ahci-pci.h"
#include "hw/ide/ahci-sysbus.h"
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index dcc39df9a4..8ac99f64d2 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -24,7 +24,7 @@
*/
#include "qemu/osdep.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "hw/scsi/scsi.h"
#include "sysemu/block-backend.h"
#include "scsi/constants.h"
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 23d213ff01..be72f4d3ed 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -33,7 +33,7 @@
#include "sysemu/reset.h"
#include "hw/ide/pci.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "trace.h"
/* CMD646 specific */
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 9c4a812902..8f2004f93b 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -41,7 +41,7 @@
#include "qemu/cutils.h"
#include "sysemu/replay.h"
#include "sysemu/runstate.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "trace.h"
/* These values were based on a Seagate ST3500418AS but have been modified
diff --git a/hw/ide/ide-bus.c b/hw/ide/ide-bus.c
index 57fe67b29c..32e9f62137 100644
--- a/hw/ide/ide-bus.c
+++ b/hw/ide/ide-bus.c
@@ -21,7 +21,7 @@
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "sysemu/runstate.h"
diff --git a/hw/ide/ide-dev.c b/hw/ide/ide-dev.c
index c8e2033469..832293ca69 100644
--- a/hw/ide/ide-dev.c
+++ b/hw/ide/ide-dev.c
@@ -23,7 +23,7 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "hw/ide/ide-dev.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c
index 0b283ac783..7a80c549ec 100644
--- a/hw/ide/ioport.c
+++ b/hw/ide/ioport.c
@@ -25,7 +25,7 @@
#include "qemu/osdep.h"
#include "hw/isa/isa.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "trace.h"
int ide_init_ioport(IDEBus *bus, ISADevice *dev, int iobase, int iobase2)
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index cc865c83dc..2fc28d64b6 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -32,7 +32,7 @@
#include "sysemu/dma.h"
#include "hw/ide/isa.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "qom/object.h"
/***********************************************************/
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 0d2c6ba910..7611a99ef5 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -33,7 +33,7 @@
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
/* debug MACIO */
// #define DEBUG_MACIO
diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
index a7f415f0fc..09781658f9 100644
--- a/hw/ide/microdrive.c
+++ b/hw/ide/microdrive.c
@@ -31,7 +31,7 @@
#include "sysemu/dma.h"
#include "hw/irq.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "qom/object.h"
#define TYPE_MICRODRIVE "microdrive"
diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
index e8f41c0610..1ba2541b40 100644
--- a/hw/ide/mmio.c
+++ b/hw/ide/mmio.c
@@ -30,7 +30,7 @@
#include "sysemu/dma.h"
#include "hw/ide/mmio.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "hw/qdev-properties.h"
/***********************************************************/
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 73efeec7f4..855cbb031d 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -30,7 +30,7 @@
#include "sysemu/dma.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "hw/ide/pci.h"
#include "trace.h"
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 1773a068c3..886cf840f1 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -30,7 +30,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/pci/pci.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "hw/ide/piix.h"
#include "hw/ide/pci.h"
#include "trace.h"
diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c
index 321b9e46a1..e28bbd160d 100644
--- a/hw/ide/sii3112.c
+++ b/hw/ide/sii3112.c
@@ -13,7 +13,7 @@
*/
#include "qemu/osdep.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "hw/ide/pci.h"
#include "qemu/module.h"
#include "trace.h"
diff --git a/hw/ide/via.c b/hw/ide/via.c
index cf151e70ec..ceecb3aa01 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -25,7 +25,7 @@
*/
#include "qemu/osdep.h"
-#include "hw/ide/internal.h"
+#include "ide_internal.h"
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs()
2024-02-25 17:16 ` [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs() Philippe Mathieu-Daudé
@ 2024-02-25 17:21 ` Philippe Mathieu-Daudé
2024-02-26 6:18 ` Thomas Huth
0 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-25 17:21 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-ppc, Leif Lindholm, Marcin Juszkiewicz, BALATON Zoltan,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland
On 25/2/24 18:16, Philippe Mathieu-Daudé wrote:
> Use ahci_ide_create_devs() instead of open-coding it.
> Not accessing AHCIDevice internals anymore allows to
> remove "hw/ide/ahci_internal.h" (which isn't really a
> public header).
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/arm/sbsa-ref.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index 5d3a574664..995c7be23e 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -37,7 +37,6 @@
> #include "hw/block/flash.h"
> #include "hw/boards.h"
> #include "hw/ide/internal.h"
> -#include "hw/ide/ahci_internal.h"
> #include "hw/ide/ahci-sysbus.h"
> #include "hw/intc/arm_gicv3_common.h"
> #include "hw/intc/arm_gicv3_its_common.h"
> @@ -572,7 +571,6 @@ static void create_ahci(const SBSAMachineState *sms)
> DriveInfo *hd[NUM_SATA_PORTS];
> SysbusAHCIState *sysahci;
> AHCIState *ahci;
> - int i;
>
> dev = qdev_new("sysbus-ahci");
> qdev_prop_set_uint32(dev, "num-ports", NUM_SATA_PORTS);
> @@ -583,12 +581,7 @@ static void create_ahci(const SBSAMachineState *sms)
> sysahci = SYSBUS_AHCI(dev);
> ahci = &sysahci->ahci;
Bah, we can even remove that 'ahci' variable.
> ide_drive_get(hd, ARRAY_SIZE(hd));
> - for (i = 0; i < ahci->ports; i++) {
> - if (hd[i] == NULL) {
> - continue;
> - }
> - ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]);
> - }
> + ahci_ide_create_devs(ahci, hd);
> }
-- >8 --
@@ -571,8 +570,6 @@ static void create_ahci(const SBSAMachineState *sms)
DeviceState *dev;
DriveInfo *hd[NUM_SATA_PORTS];
SysbusAHCIState *sysahci;
- AHCIState *ahci;
- int i;
dev = qdev_new("sysbus-ahci");
qdev_prop_set_uint32(dev, "num-ports", NUM_SATA_PORTS);
@@ -581,14 +578,8 @@ static void create_ahci(const SBSAMachineState *sms)
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0,
qdev_get_gpio_in(sms->gic, irq));
sysahci = SYSBUS_AHCI(dev);
- ahci = &sysahci->ahci;
ide_drive_get(hd, ARRAY_SIZE(hd));
- for (i = 0; i < ahci->ports; i++) {
- if (hd[i] == NULL) {
- continue;
- }
- ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]);
- }
+ ahci_ide_create_devs(&sysahci->ahci, hd);
}
---
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
2024-02-25 17:16 ` [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path Philippe Mathieu-Daudé
@ 2024-02-25 20:28 ` BALATON Zoltan
2024-02-26 7:40 ` Markus Armbruster
0 siblings, 1 reply; 14+ messages in thread
From: BALATON Zoltan @ 2024-02-25 20:28 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, qemu-ppc, Leif Lindholm, Marcin Juszkiewicz,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland
[-- Attachment #1: Type: text/plain, Size: 7662 bytes --]
On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote:
> Rename "internal.h" as "ide_internal.h", and include
Is there a convention about using underscore or dash in file names? The
headers Thomas added are using - as well as ahci-allwinner.c, only
ahci_internal.h has _ (but there are others elsewhere such as
pci_device.h). Maybe we should be consistent at least within IDE and this
series is now a good opportunity for renaming these headers to match. But
it's just a small nit, thanks for picking this up.
Regards,
BALATON Zoltan
> it via its relative local path, instead of absolute
> to the project root path.
>
> Mechanical patch doing:
>
> $ sed -i -e 's#hw/ide/internal.h#ide_internal.h#' \
> $(git grep -l hw/ide/internal)
> $ git mv hw/ide/internal.h hw/ide/ide_internal.h
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/ide/ahci_internal.h | 2 +-
> hw/ide/{internal.h => ide_internal.h} | 0
> hw/ide/ahci.c | 2 +-
> hw/ide/atapi.c | 2 +-
> hw/ide/cmd646.c | 2 +-
> hw/ide/core.c | 2 +-
> hw/ide/ide-bus.c | 2 +-
> hw/ide/ide-dev.c | 2 +-
> hw/ide/ioport.c | 2 +-
> hw/ide/isa.c | 2 +-
> hw/ide/macio.c | 2 +-
> hw/ide/microdrive.c | 2 +-
> hw/ide/mmio.c | 2 +-
> hw/ide/pci.c | 2 +-
> hw/ide/piix.c | 2 +-
> hw/ide/sii3112.c | 2 +-
> hw/ide/via.c | 2 +-
> 17 files changed, 16 insertions(+), 16 deletions(-)
> rename hw/ide/{internal.h => ide_internal.h} (100%)
>
> diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h
> index 4e13329bb2..34f3d50ca9 100644
> --- a/hw/ide/ahci_internal.h
> +++ b/hw/ide/ahci_internal.h
> @@ -25,7 +25,7 @@
> #define HW_IDE_AHCI_INTERNAL_H
>
> #include "hw/ide/ahci.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "hw/pci/pci_device.h"
>
> #define AHCI_MEM_BAR_SIZE 0x1000
> diff --git a/hw/ide/internal.h b/hw/ide/ide_internal.h
> similarity index 100%
> rename from hw/ide/internal.h
> rename to hw/ide/ide_internal.h
> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
> index 54c9685495..c2af344ac5 100644
> --- a/hw/ide/ahci.c
> +++ b/hw/ide/ahci.c
> @@ -34,7 +34,7 @@
> #include "qemu/module.h"
> #include "sysemu/block-backend.h"
> #include "sysemu/dma.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "hw/ide/pci.h"
> #include "hw/ide/ahci-pci.h"
> #include "hw/ide/ahci-sysbus.h"
> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
> index dcc39df9a4..8ac99f64d2 100644
> --- a/hw/ide/atapi.c
> +++ b/hw/ide/atapi.c
> @@ -24,7 +24,7 @@
> */
>
> #include "qemu/osdep.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "hw/scsi/scsi.h"
> #include "sysemu/block-backend.h"
> #include "scsi/constants.h"
> diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
> index 23d213ff01..be72f4d3ed 100644
> --- a/hw/ide/cmd646.c
> +++ b/hw/ide/cmd646.c
> @@ -33,7 +33,7 @@
> #include "sysemu/reset.h"
>
> #include "hw/ide/pci.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "trace.h"
>
> /* CMD646 specific */
> diff --git a/hw/ide/core.c b/hw/ide/core.c
> index 9c4a812902..8f2004f93b 100644
> --- a/hw/ide/core.c
> +++ b/hw/ide/core.c
> @@ -41,7 +41,7 @@
> #include "qemu/cutils.h"
> #include "sysemu/replay.h"
> #include "sysemu/runstate.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "trace.h"
>
> /* These values were based on a Seagate ST3500418AS but have been modified
> diff --git a/hw/ide/ide-bus.c b/hw/ide/ide-bus.c
> index 57fe67b29c..32e9f62137 100644
> --- a/hw/ide/ide-bus.c
> +++ b/hw/ide/ide-bus.c
> @@ -21,7 +21,7 @@
> #include "qapi/error.h"
> #include "qemu/error-report.h"
> #include "qemu/module.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "sysemu/block-backend.h"
> #include "sysemu/blockdev.h"
> #include "sysemu/runstate.h"
> diff --git a/hw/ide/ide-dev.c b/hw/ide/ide-dev.c
> index c8e2033469..832293ca69 100644
> --- a/hw/ide/ide-dev.c
> +++ b/hw/ide/ide-dev.c
> @@ -23,7 +23,7 @@
> #include "qemu/error-report.h"
> #include "qemu/module.h"
> #include "hw/ide/ide-dev.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "sysemu/block-backend.h"
> #include "sysemu/blockdev.h"
> #include "sysemu/sysemu.h"
> diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c
> index 0b283ac783..7a80c549ec 100644
> --- a/hw/ide/ioport.c
> +++ b/hw/ide/ioport.c
> @@ -25,7 +25,7 @@
>
> #include "qemu/osdep.h"
> #include "hw/isa/isa.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "trace.h"
>
> int ide_init_ioport(IDEBus *bus, ISADevice *dev, int iobase, int iobase2)
> diff --git a/hw/ide/isa.c b/hw/ide/isa.c
> index cc865c83dc..2fc28d64b6 100644
> --- a/hw/ide/isa.c
> +++ b/hw/ide/isa.c
> @@ -32,7 +32,7 @@
> #include "sysemu/dma.h"
>
> #include "hw/ide/isa.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "qom/object.h"
>
> /***********************************************************/
> diff --git a/hw/ide/macio.c b/hw/ide/macio.c
> index 0d2c6ba910..7611a99ef5 100644
> --- a/hw/ide/macio.c
> +++ b/hw/ide/macio.c
> @@ -33,7 +33,7 @@
> #include "sysemu/block-backend.h"
> #include "sysemu/dma.h"
>
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
>
> /* debug MACIO */
> // #define DEBUG_MACIO
> diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
> index a7f415f0fc..09781658f9 100644
> --- a/hw/ide/microdrive.c
> +++ b/hw/ide/microdrive.c
> @@ -31,7 +31,7 @@
> #include "sysemu/dma.h"
> #include "hw/irq.h"
>
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "qom/object.h"
>
> #define TYPE_MICRODRIVE "microdrive"
> diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
> index e8f41c0610..1ba2541b40 100644
> --- a/hw/ide/mmio.c
> +++ b/hw/ide/mmio.c
> @@ -30,7 +30,7 @@
> #include "sysemu/dma.h"
>
> #include "hw/ide/mmio.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "hw/qdev-properties.h"
>
> /***********************************************************/
> diff --git a/hw/ide/pci.c b/hw/ide/pci.c
> index 73efeec7f4..855cbb031d 100644
> --- a/hw/ide/pci.c
> +++ b/hw/ide/pci.c
> @@ -30,7 +30,7 @@
> #include "sysemu/dma.h"
> #include "qemu/error-report.h"
> #include "qemu/module.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "hw/ide/pci.h"
> #include "trace.h"
>
> diff --git a/hw/ide/piix.c b/hw/ide/piix.c
> index 1773a068c3..886cf840f1 100644
> --- a/hw/ide/piix.c
> +++ b/hw/ide/piix.c
> @@ -30,7 +30,7 @@
> #include "qemu/osdep.h"
> #include "qapi/error.h"
> #include "hw/pci/pci.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "hw/ide/piix.h"
> #include "hw/ide/pci.h"
> #include "trace.h"
> diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c
> index 321b9e46a1..e28bbd160d 100644
> --- a/hw/ide/sii3112.c
> +++ b/hw/ide/sii3112.c
> @@ -13,7 +13,7 @@
> */
>
> #include "qemu/osdep.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "hw/ide/pci.h"
> #include "qemu/module.h"
> #include "trace.h"
> diff --git a/hw/ide/via.c b/hw/ide/via.c
> index cf151e70ec..ceecb3aa01 100644
> --- a/hw/ide/via.c
> +++ b/hw/ide/via.c
> @@ -25,7 +25,7 @@
> */
>
> #include "qemu/osdep.h"
> -#include "hw/ide/internal.h"
> +#include "ide_internal.h"
> #include "hw/pci/pci.h"
> #include "migration/vmstate.h"
> #include "qemu/module.h"
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs()
2024-02-25 17:21 ` Philippe Mathieu-Daudé
@ 2024-02-26 6:18 ` Thomas Huth
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2024-02-26 6:18 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-ppc, Leif Lindholm, Marcin Juszkiewicz, BALATON Zoltan,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland
On 25/02/2024 18.21, Philippe Mathieu-Daudé wrote:
> On 25/2/24 18:16, Philippe Mathieu-Daudé wrote:
>> Use ahci_ide_create_devs() instead of open-coding it.
>> Not accessing AHCIDevice internals anymore allows to
>> remove "hw/ide/ahci_internal.h" (which isn't really a
>> public header).
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> hw/arm/sbsa-ref.c | 9 +--------
>> 1 file changed, 1 insertion(+), 8 deletions(-)
>>
>> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
>> index 5d3a574664..995c7be23e 100644
>> --- a/hw/arm/sbsa-ref.c
>> +++ b/hw/arm/sbsa-ref.c
>> @@ -37,7 +37,6 @@
>> #include "hw/block/flash.h"
>> #include "hw/boards.h"
>> #include "hw/ide/internal.h"
>> -#include "hw/ide/ahci_internal.h"
>> #include "hw/ide/ahci-sysbus.h"
>> #include "hw/intc/arm_gicv3_common.h"
>> #include "hw/intc/arm_gicv3_its_common.h"
>> @@ -572,7 +571,6 @@ static void create_ahci(const SBSAMachineState *sms)
>> DriveInfo *hd[NUM_SATA_PORTS];
>> SysbusAHCIState *sysahci;
>> AHCIState *ahci;
>> - int i;
>> dev = qdev_new("sysbus-ahci");
>> qdev_prop_set_uint32(dev, "num-ports", NUM_SATA_PORTS);
>> @@ -583,12 +581,7 @@ static void create_ahci(const SBSAMachineState *sms)
>> sysahci = SYSBUS_AHCI(dev);
>> ahci = &sysahci->ahci;
>
> Bah, we can even remove that 'ahci' variable.
>
>> ide_drive_get(hd, ARRAY_SIZE(hd));
>> - for (i = 0; i < ahci->ports; i++) {
>> - if (hd[i] == NULL) {
>> - continue;
>> - }
>> - ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]);
>> - }
>> + ahci_ide_create_devs(ahci, hd);
>> }
>
> -- >8 --
> @@ -571,8 +570,6 @@ static void create_ahci(const SBSAMachineState *sms)
> DeviceState *dev;
> DriveInfo *hd[NUM_SATA_PORTS];
> SysbusAHCIState *sysahci;
> - AHCIState *ahci;
> - int i;
>
> dev = qdev_new("sysbus-ahci");
> qdev_prop_set_uint32(dev, "num-ports", NUM_SATA_PORTS);
> @@ -581,14 +578,8 @@ static void create_ahci(const SBSAMachineState *sms)
> sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, qdev_get_gpio_in(sms->gic,
> irq));
>
> sysahci = SYSBUS_AHCI(dev);
> - ahci = &sysahci->ahci;
> ide_drive_get(hd, ARRAY_SIZE(hd));
> - for (i = 0; i < ahci->ports; i++) {
> - if (hd[i] == NULL) {
> - continue;
> - }
> - ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]);
> - }
> + ahci_ide_create_devs(&sysahci->ahci, hd);
> }
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
2024-02-25 20:28 ` BALATON Zoltan
@ 2024-02-26 7:40 ` Markus Armbruster
2024-02-26 8:00 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 14+ messages in thread
From: Markus Armbruster @ 2024-02-26 7:40 UTC (permalink / raw)
To: BALATON Zoltan
Cc: Philippe Mathieu-Daudé,
qemu-devel, qemu-ppc, Leif Lindholm, Marcin Juszkiewicz,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland
BALATON Zoltan <balaton@eik.bme.hu> writes:
> On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote:
>> Rename "internal.h" as "ide_internal.h", and include
>
> Is there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as ahci-allwinner.c, only ahci_internal.h has _ (but there are others elsewhere such as pci_device.h). Maybe we should be consistent at least within IDE and this series is now a good opportunity for renaming these headers to match. But it's just a small nit, thanks for picking this up.
This is one of the many unnecessary inconsistencies we're inflicting on
ourselves.
We have more than 3600 file names containing '-', and more almost 2700
containing '_'. Bizarrely, 68 of them contain both.
I strongly prefer '_' myself.
Zoltan is making a local consistency argument for '-'.
Let's use '-' here.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
2024-02-26 7:40 ` Markus Armbruster
@ 2024-02-26 8:00 ` Philippe Mathieu-Daudé
2024-02-26 8:09 ` Philippe Mathieu-Daudé
2024-02-26 10:50 ` BALATON Zoltan
0 siblings, 2 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-26 8:00 UTC (permalink / raw)
To: Markus Armbruster, BALATON Zoltan
Cc: qemu-devel, qemu-ppc, Leif Lindholm, Marcin Juszkiewicz,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland
On 26/2/24 08:40, Markus Armbruster wrote:
> BALATON Zoltan <balaton@eik.bme.hu> writes:
>
>> On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote:
>>> Rename "internal.h" as "ide_internal.h", and include
>>
>> Is there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as ahci-allwinner.c, only ahci_internal.h has _ (but there are others elsewhere such as pci_device.h). Maybe we should be consistent at least within IDE and this series is now a good opportunity for renaming these headers to match. But it's just a small nit, thanks for picking this up.
>
> This is one of the many unnecessary inconsistencies we're inflicting on
> ourselves.
>
> We have more than 3600 file names containing '-', and more almost 2700
> containing '_'. Bizarrely, 68 of them contain both.
>
> I strongly prefer '_' myself.
>
> Zoltan is making a local consistency argument for '-'.
>
> Let's use '-' here.
Fine, patch updated.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
2024-02-26 8:00 ` Philippe Mathieu-Daudé
@ 2024-02-26 8:09 ` Philippe Mathieu-Daudé
2024-02-26 10:54 ` BALATON Zoltan
2024-02-26 10:50 ` BALATON Zoltan
1 sibling, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-26 8:09 UTC (permalink / raw)
To: Markus Armbruster, BALATON Zoltan
Cc: qemu-devel, qemu-ppc, Leif Lindholm, Marcin Juszkiewicz,
Radoslaw Biernacki, qemu-arm, Peter Maydell, qemu-block,
John Snow, Mark Cave-Ayland
On 26/2/24 09:00, Philippe Mathieu-Daudé wrote:
> On 26/2/24 08:40, Markus Armbruster wrote:
>> BALATON Zoltan <balaton@eik.bme.hu> writes:
>>
>>> On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote:
>>>> Rename "internal.h" as "ide_internal.h", and include
>>>
>>> Is there a convention about using underscore or dash in file names?
>>> The headers Thomas added are using - as well as ahci-allwinner.c,
>>> only ahci_internal.h has _ (but there are others elsewhere such as
>>> pci_device.h). Maybe we should be consistent at least within IDE and
>>> this series is now a good opportunity for renaming these headers to
>>> match. But it's just a small nit, thanks for picking this up.
>>
>> This is one of the many unnecessary inconsistencies we're inflicting on
>> ourselves.
>>
>> We have more than 3600 file names containing '-', and more almost 2700
>> containing '_'. Bizarrely, 68 of them contain both.
>>
>> I strongly prefer '_' myself.
>>
>> Zoltan is making a local consistency argument for '-'.
>>
>> Let's use '-' here.
BTW by "here" I understood "in this patch". After v3 only a single
file use '_': "ahci_internal.h", but Zoltan said he is uninterested
and doesn't care about it so I'm not renaming it.
(https://lore.kernel.org/qemu-devel/3e576d33-1973-3f44-afd1-9224609f89a6@eik.bme.hu/)
>
> Fine, patch updated.
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
2024-02-26 8:00 ` Philippe Mathieu-Daudé
2024-02-26 8:09 ` Philippe Mathieu-Daudé
@ 2024-02-26 10:50 ` BALATON Zoltan
2024-02-26 13:43 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 14+ messages in thread
From: BALATON Zoltan @ 2024-02-26 10:50 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Markus Armbruster, qemu-devel, qemu-ppc, Leif Lindholm,
Marcin Juszkiewicz, Radoslaw Biernacki, qemu-arm, Peter Maydell,
qemu-block, John Snow, Mark Cave-Ayland
[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]
On Mon, 26 Feb 2024, Philippe Mathieu-Daudé wrote:
> On 26/2/24 08:40, Markus Armbruster wrote:
>> BALATON Zoltan <balaton@eik.bme.hu> writes:
>>
>>> On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote:
>>>> Rename "internal.h" as "ide_internal.h", and include
>>>
>>> Is there a convention about using underscore or dash in file names? The
>>> headers Thomas added are using - as well as ahci-allwinner.c, only
>>> ahci_internal.h has _ (but there are others elsewhere such as
>>> pci_device.h). Maybe we should be consistent at least within IDE and this
>>> series is now a good opportunity for renaming these headers to match. But
>>> it's just a small nit, thanks for picking this up.
>>
>> This is one of the many unnecessary inconsistencies we're inflicting on
>> ourselves.
>>
>> We have more than 3600 file names containing '-', and more almost 2700
>> containing '_'. Bizarrely, 68 of them contain both.
>>
>> I strongly prefer '_' myself.
>>
>> Zoltan is making a local consistency argument for '-'.
>>
>> Let's use '-' here.
>
> Fine, patch updated.
And then please also rename ahci_internal.h to use '-' to be really
consistent.
Regards,
BALATON Zoltan
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
2024-02-26 8:09 ` Philippe Mathieu-Daudé
@ 2024-02-26 10:54 ` BALATON Zoltan
0 siblings, 0 replies; 14+ messages in thread
From: BALATON Zoltan @ 2024-02-26 10:54 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Markus Armbruster, qemu-devel, qemu-ppc, Leif Lindholm,
Marcin Juszkiewicz, Radoslaw Biernacki, qemu-arm, Peter Maydell,
qemu-block, John Snow, Mark Cave-Ayland
[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]
On Mon, 26 Feb 2024, Philippe Mathieu-Daudé wrote:
> On 26/2/24 09:00, Philippe Mathieu-Daudé wrote:
>> On 26/2/24 08:40, Markus Armbruster wrote:
>>> BALATON Zoltan <balaton@eik.bme.hu> writes:
>>>
>>>> On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote:
>>>>> Rename "internal.h" as "ide_internal.h", and include
>>>>
>>>> Is there a convention about using underscore or dash in file names? The
>>>> headers Thomas added are using - as well as ahci-allwinner.c, only
>>>> ahci_internal.h has _ (but there are others elsewhere such as
>>>> pci_device.h). Maybe we should be consistent at least within IDE and this
>>>> series is now a good opportunity for renaming these headers to match. But
>>>> it's just a small nit, thanks for picking this up.
>>>
>>> This is one of the many unnecessary inconsistencies we're inflicting on
>>> ourselves.
>>>
>>> We have more than 3600 file names containing '-', and more almost 2700
>>> containing '_'. Bizarrely, 68 of them contain both.
>>>
>>> I strongly prefer '_' myself.
>>>
>>> Zoltan is making a local consistency argument for '-'.
>>>
>>> Let's use '-' here.
>
> BTW by "here" I understood "in this patch". After v3 only a single
> file use '_': "ahci_internal.h", but Zoltan said he is uninterested
> and doesn't care about it so I'm not renaming it.
> (https://lore.kernel.org/qemu-devel/3e576d33-1973-3f44-afd1-9224609f89a6@eik.bme.hu/)
Yes, I don't care and also prefer _ in file names but since all the other
headers use - now it's simpler to make all of them the same just for
consistency so I've meant to rename ahci_internal.h too but forgot to
mention it explikcitly. Sorry for that.
Regards,
BALATON Zoltan
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
2024-02-26 10:50 ` BALATON Zoltan
@ 2024-02-26 13:43 ` Philippe Mathieu-Daudé
2024-02-26 13:51 ` BALATON Zoltan
0 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-26 13:43 UTC (permalink / raw)
To: BALATON Zoltan
Cc: Markus Armbruster, qemu-devel, qemu-ppc, Leif Lindholm,
Marcin Juszkiewicz, Radoslaw Biernacki, qemu-arm, Peter Maydell,
qemu-block, John Snow, Mark Cave-Ayland
On 26/2/24 11:50, BALATON Zoltan wrote:
> On Mon, 26 Feb 2024, Philippe Mathieu-Daudé wrote:
>> On 26/2/24 08:40, Markus Armbruster wrote:
>>> BALATON Zoltan <balaton@eik.bme.hu> writes:
>>>
>>>> On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote:
>>>>> Rename "internal.h" as "ide_internal.h", and include
>>>>
>>>> Is there a convention about using underscore or dash in file names?
>>>> The headers Thomas added are using - as well as ahci-allwinner.c,
>>>> only ahci_internal.h has _ (but there are others elsewhere such as
>>>> pci_device.h). Maybe we should be consistent at least within IDE and
>>>> this series is now a good opportunity for renaming these headers to
>>>> match. But it's just a small nit, thanks for picking this up.
>>>
>>> This is one of the many unnecessary inconsistencies we're inflicting on
>>> ourselves.
>>>
>>> We have more than 3600 file names containing '-', and more almost 2700
>>> containing '_'. Bizarrely, 68 of them contain both.
>>>
>>> I strongly prefer '_' myself.
>>>
>>> Zoltan is making a local consistency argument for '-'.
>>>
>>> Let's use '-' here.
>>
>> Fine, patch updated.
>
> And then please also rename ahci_internal.h to use '-' to be really
> consistent.
I'm sorry but I don't have time. Maybe fill a ByteSized task?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
2024-02-26 13:43 ` Philippe Mathieu-Daudé
@ 2024-02-26 13:51 ` BALATON Zoltan
0 siblings, 0 replies; 14+ messages in thread
From: BALATON Zoltan @ 2024-02-26 13:51 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Markus Armbruster, qemu-devel, qemu-ppc, Leif Lindholm,
Marcin Juszkiewicz, Radoslaw Biernacki, qemu-arm, Peter Maydell,
qemu-block, John Snow, Mark Cave-Ayland
[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]
On Mon, 26 Feb 2024, Philippe Mathieu-Daudé wrote:
> On 26/2/24 11:50, BALATON Zoltan wrote:
>> On Mon, 26 Feb 2024, Philippe Mathieu-Daudé wrote:
>>> On 26/2/24 08:40, Markus Armbruster wrote:
>>>> BALATON Zoltan <balaton@eik.bme.hu> writes:
>>>>
>>>>> On Sun, 25 Feb 2024, Philippe Mathieu-Daudé wrote:
>>>>>> Rename "internal.h" as "ide_internal.h", and include
>>>>>
>>>>> Is there a convention about using underscore or dash in file names? The
>>>>> headers Thomas added are using - as well as ahci-allwinner.c, only
>>>>> ahci_internal.h has _ (but there are others elsewhere such as
>>>>> pci_device.h). Maybe we should be consistent at least within IDE and
>>>>> this series is now a good opportunity for renaming these headers to
>>>>> match. But it's just a small nit, thanks for picking this up.
>>>>
>>>> This is one of the many unnecessary inconsistencies we're inflicting on
>>>> ourselves.
>>>>
>>>> We have more than 3600 file names containing '-', and more almost 2700
>>>> containing '_'. Bizarrely, 68 of them contain both.
>>>>
>>>> I strongly prefer '_' myself.
>>>>
>>>> Zoltan is making a local consistency argument for '-'.
>>>>
>>>> Let's use '-' here.
>>>
>>> Fine, patch updated.
>>
>> And then please also rename ahci_internal.h to use '-' to be really
>> consistent.
>
> I'm sorry but I don't have time. Maybe fill a ByteSized task?
No problem, just noted in case you'd respin it for some other reason.
Otherwise somebody can send a patch later.
Regards,
BALATON Zoltan
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-02-26 14:52 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-25 17:16 [PATCH v2 0/3] hw/ide: Make "ide_internal.h" really internal Philippe Mathieu-Daudé
2024-02-25 17:16 ` [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs() Philippe Mathieu-Daudé
2024-02-25 17:21 ` Philippe Mathieu-Daudé
2024-02-26 6:18 ` Thomas Huth
2024-02-25 17:16 ` [PATCH v2 2/3] hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/ Philippe Mathieu-Daudé
2024-02-25 17:16 ` [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path Philippe Mathieu-Daudé
2024-02-25 20:28 ` BALATON Zoltan
2024-02-26 7:40 ` Markus Armbruster
2024-02-26 8:00 ` Philippe Mathieu-Daudé
2024-02-26 8:09 ` Philippe Mathieu-Daudé
2024-02-26 10:54 ` BALATON Zoltan
2024-02-26 10:50 ` BALATON Zoltan
2024-02-26 13:43 ` Philippe Mathieu-Daudé
2024-02-26 13:51 ` BALATON Zoltan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.