hw/ide: Make "ide_internal.h" really internal
v2 cover hw/ide: Make "ide_internal.h" really internal
Since v1:
- Remove use of "ahci_internal.h" in SBSA-Ref
- Rename "internal.h" -> "ide_internal.h"
Supersedes: <[email protected]>
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%)
Signature · 1 line
2.41.0
PATCH v2 1/3 hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs()
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).
--- hw/arm/sbsa-ref.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
hw/arm/sbsa-ref.c +1 -8
@@ -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)
Signature · 1 line
2.41.0
Re: [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs()
Quoted 31 lines · 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é <[email protected]>--- hw/arm/sbsa-ref.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)hw/arm/sbsa-ref.c +0
-2@@ -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 );
hw/arm/sbsa-ref.c static void create_ahci(const SBSAMachineState *sms) · line 582
Quoted 2 lines
hw/arm/sbsa-ref.c +0
-0@@ -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.
hw/arm/sbsa-ref.c static void create_ahci(const SBSAMachineState *sms) · line 585
Quoted 9 lines
hw/arm/sbsa-ref.c +1
-6ide_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);
}
---
Thomas Huth
Reviewed-byRe: [PATCH v2 1/3] hw/arm/sbsa-ref: Do not open-code ahci_ide_create_devs()
Quoted 61 lines · Philippe Mathieu-Daudé
Quoted 30 lines · 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é <[email protected]>---
hw/arm/sbsa-ref.c| 9 +--------1 file changed, 1 insertion(+), 8 deletions(-)hw/arm/sbsa-ref.c +0
-2@@ -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);hw/arm/sbsa-ref.c static void create_ahci(const SBSAMachineState *sms) · line 582
Quoted 2 lines
hw/arm/sbsa-ref.c +0
-0@@ -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.
hw/arm/sbsa-ref.c static void create_ahci(const SBSAMachineState *sms) · line 585
Quoted 9 lines
hw/arm/sbsa-ref.c +1
-6ide_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 --
hw/arm/sbsa-ref.c +0
-2@@ -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);
hw/arm/sbsa-ref.c static void create_ahci(const SBSAMachineState *sms) · line 584
Quoted 10 lines
hw/arm/sbsa-ref.c +1
-7- 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); }
PATCH v2 2/3 hw/ide: Remove last two uses of ide/internal.h outside of hw/ide/
In reply to Philippe Mathieu-DaudéFrom: BALATON Zoltan <[email protected]>
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.
Message-ID: <[email protected]>
---
{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%)hw/ide/internal.h renamed from include/hw/ide/internal.h +0 -0
include/hw/misc/macio/macio.h +1 -1
@@ -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"
hw/arm/sbsa-ref.c +1 -1
@@ -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"
Signature · 1 line
2.41.0
PATCH v2 3/3 hw/ide: Include 'ide_internal.h' from current path
In reply to 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---
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%)hw/ide/ahci_internal.h +1 -1
@@ -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
hw/ide/ide_internal.h renamed from hw/ide/internal.h +0 -0
hw/ide/ahci.c +1 -1
@@ -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"
hw/ide/atapi.c +1 -1
@@ -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"
hw/ide/cmd646.c +1 -1
@@ -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 */
hw/ide/core.c +1 -1
@@ -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
hw/ide/ide-bus.c +1 -1
@@ -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"
hw/ide/ide-dev.c +1 -1
@@ -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"
hw/ide/ioport.c +1 -1
@@ -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)
hw/ide/isa.c +1 -1
@@ -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" /***********************************************************/
hw/ide/macio.c +1 -1
@@ -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
hw/ide/microdrive.c +1 -1
@@ -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"
hw/ide/mmio.c +1 -1
@@ -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" /***********************************************************/
hw/ide/pci.c +1 -1
@@ -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"
hw/ide/piix.c +1 -1
@@ -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"
hw/ide/sii3112.c +1 -1
@@ -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"
hw/ide/via.c +1 -1
@@ -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"
Signature · 1 line
2.41.0
Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
Quoted 1 line · Philippe Mathieu-Daudé
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
Quoted 244 lines
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.hSigned-off-by Philippe Mathieu-Daudé <[email protected]>---
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%)hw/ide/ahci_internal.h +1
-1@@ -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 0x1000hw/ide/ide_internal.h renamed from hw/ide/internal.h +0
-0hw/ide/ahci.c +1
-1@@ -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" hw/ide/atapi.c +1
-1@@ -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" hw/ide/cmd646.c +1
-1@@ -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 */ hw/ide/core.c +1
-1@@ -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 hw/ide/ide-bus.c +1
-1@@ -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" hw/ide/ide-dev.c +1
-1@@ -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" hw/ide/ioport.c +1
-1@@ -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)hw/ide/isa.c +1
-1@@ -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" /***********************************************************/ hw/ide/macio.c +1
-1@@ -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 hw/ide/microdrive.c +1
-1@@ -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"hw/ide/mmio.c +1
-1@@ -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" /***********************************************************/ hw/ide/pci.c +1
-1@@ -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" hw/ide/piix.c +1
-1@@ -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" hw/ide/sii3112.c +1
-1@@ -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" hw/ide/via.c +1
-1@@ -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"
Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
Quoted 4 lines · BALATON Zoltan
Quoted 1 line · Philippe Mathieu-Daudé
Rename "
internal.h" as "ide_internal.h", and includeIs there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as
ahci-allwinner.c, onlyahci_internal.hhas _ (but there are others elsewhere such aspci_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.
Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
Quoted 10 lines · Markus Armbruster
Quoted 4 lines · BALATON Zoltan
Quoted 1 line · Philippe Mathieu-Daudé
Rename "
internal.h" as "ide_internal.h", and includeIs there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as
ahci-allwinner.c, onlyahci_internal.hhas _ (but there are others elsewhere such aspci_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.
Quoted 8 lines
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.
Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Markus Armbruster
Quoted 4 lines · BALATON Zoltan
Quoted 1 line · Philippe Mathieu-Daudé
Rename "
internal.h" as "ide_internal.h", and includeIs there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as
ahci-allwinner.c, onlyahci_internal.hhas _ (but there are others elsewhere such aspci_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.
Quoted 8 lines
Quoted 8 lines
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/[email protected]/)
Quoted 3 lines
Fine, patch updated.
Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
Quoted 17 lines · Philippe Mathieu-Daudé
Quoted 16 lines · Philippe Mathieu-Daudé
Quoted 15 lines · Markus Armbruster
Quoted 4 lines · BALATON Zoltan
Quoted 1 line · Philippe Mathieu-Daudé
Rename "
internal.h" as "ide_internal.h", and includeIs there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as
ahci-allwinner.c, onlyahci_internal.hhas _ (but there are others elsewhere such aspci_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.
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
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/[email protected]/)
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
Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
In reply to Philippe Mathieu-DaudéQuoted 14 lines · Philippe Mathieu-Daudé
Quoted 13 lines · Markus Armbruster
Quoted 4 lines · BALATON Zoltan
Quoted 1 line · Philippe Mathieu-Daudé
Rename "
internal.h" as "ide_internal.h", and includeIs there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as
ahci-allwinner.c, onlyahci_internal.hhas _ (but there are others elsewhere such aspci_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.
Quoted 7 lines
Quoted 5 lines
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
Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
Quoted 17 lines · BALATON Zoltan
Quoted 16 lines · Philippe Mathieu-Daudé
Quoted 15 lines · Markus Armbruster
Quoted 4 lines · BALATON Zoltan
Quoted 1 line · Philippe Mathieu-Daudé
Rename "
internal.h" as "ide_internal.h", and includeIs there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as
ahci-allwinner.c, onlyahci_internal.hhas _ (but there are others elsewhere such aspci_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.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Zoltan is making a local consistency argument for '-'.
Let's use '-' here.
Fine, patch updated.
And then please also rename
ahci_internal.hto use '-' to be really consistent.
I'm sorry but I don't have time. Maybe fill a ByteSized task?
Re: [PATCH v2 3/3] hw/ide: Include 'ide_internal.h' from current path
Quoted 20 lines · Philippe Mathieu-Daudé
Quoted 19 lines · BALATON Zoltan
Quoted 18 lines · Philippe Mathieu-Daudé
Quoted 17 lines · Markus Armbruster
Quoted 4 lines · BALATON Zoltan
Quoted 1 line · Philippe Mathieu-Daudé
Rename "
internal.h" as "ide_internal.h", and includeIs there a convention about using underscore or dash in file names? The headers Thomas added are using - as well as
ahci-allwinner.c, onlyahci_internal.hhas _ (but there are others elsewhere such aspci_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 '-'.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Let's use '-' here.
Fine, patch updated.
And then please also rename
ahci_internal.hto 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