[PATCH v2 06/15] hw/ide: Rename ich.c -> ich9_ahci.c

Philippe Mathieu-Daudé posted 15 patches 8 months, 3 weeks ago
[PATCH v2 06/15] hw/ide: Rename ich.c -> ich9_ahci.c
Posted by Philippe Mathieu-Daudé 8 months, 3 weeks ago
Most ICH9-related files use the 'ich9_' prefix.
Mention 'AHCI' in the file name.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/ide/{ich.c => ich9_ahci.c} | 0
 hw/ide/meson.build            | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename hw/ide/{ich.c => ich9_ahci.c} (100%)

diff --git a/hw/ide/ich.c b/hw/ide/ich9_ahci.c
similarity index 100%
rename from hw/ide/ich.c
rename to hw/ide/ich9_ahci.c
diff --git a/hw/ide/meson.build b/hw/ide/meson.build
index d09705cac0..2a7cd8405d 100644
--- a/hw/ide/meson.build
+++ b/hw/ide/meson.build
@@ -1,5 +1,5 @@
 system_ss.add(when: 'CONFIG_AHCI', if_true: files('ahci.c'))
-system_ss.add(when: 'CONFIG_AHCI_ICH9', if_true: files('ich.c'))
+system_ss.add(when: 'CONFIG_AHCI_ICH9', if_true: files('ich9_ahci.c'))
 system_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('ahci-allwinner.c'))
 system_ss.add(when: 'CONFIG_IDE_BUS', if_true: files('ide-bus.c'))
 system_ss.add(when: 'CONFIG_IDE_CF', if_true: files('cf.c'))
-- 
2.41.0


Re: [PATCH v2 06/15] hw/ide: Rename ich.c -> ich9_ahci.c
Posted by BALATON Zoltan 8 months, 3 weeks ago
On Mon, 26 Feb 2024, Philippe Mathieu-Daudé wrote:
> Most ICH9-related files use the 'ich9_' prefix.
> Mention 'AHCI' in the file name.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/ide/{ich.c => ich9_ahci.c} | 0

That would rather be ahci-ich9.h then analogous to ahci-allwinnet.c 
maybe?

Regsards,
BALATON Zoltan

> hw/ide/meson.build            | 2 +-
> 2 files changed, 1 insertion(+), 1 deletion(-)
> rename hw/ide/{ich.c => ich9_ahci.c} (100%)
>
> diff --git a/hw/ide/ich.c b/hw/ide/ich9_ahci.c
> similarity index 100%
> rename from hw/ide/ich.c
> rename to hw/ide/ich9_ahci.c
> diff --git a/hw/ide/meson.build b/hw/ide/meson.build
> index d09705cac0..2a7cd8405d 100644
> --- a/hw/ide/meson.build
> +++ b/hw/ide/meson.build
> @@ -1,5 +1,5 @@
> system_ss.add(when: 'CONFIG_AHCI', if_true: files('ahci.c'))
> -system_ss.add(when: 'CONFIG_AHCI_ICH9', if_true: files('ich.c'))
> +system_ss.add(when: 'CONFIG_AHCI_ICH9', if_true: files('ich9_ahci.c'))
> system_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('ahci-allwinner.c'))
> system_ss.add(when: 'CONFIG_IDE_BUS', if_true: files('ide-bus.c'))
> system_ss.add(when: 'CONFIG_IDE_CF', if_true: files('cf.c'))
>
Re: [PATCH v2 06/15] hw/ide: Rename ich.c -> ich9_ahci.c
Posted by Philippe Mathieu-Daudé 8 months, 3 weeks ago
On 26/2/24 13:52, BALATON Zoltan wrote:
> On Mon, 26 Feb 2024, Philippe Mathieu-Daudé wrote:
>> Most ICH9-related files use the 'ich9_' prefix.
>> Mention 'AHCI' in the file name.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> hw/ide/{ich.c => ich9_ahci.c} | 0
> 
> That would rather be ahci-ich9.h then analogous to ahci-allwinnet.c maybe?

We can have all ICH9 functions named ich9_foo.c, or all AHCI
implementations named bar_ahci.c. But currently there is no
particular style enforced and we have a mix. I don't mind much.

> Regsards,
> BALATON Zoltan
> 
>> hw/ide/meson.build            | 2 +-
>> 2 files changed, 1 insertion(+), 1 deletion(-)
>> rename hw/ide/{ich.c => ich9_ahci.c} (100%)


Re: [PATCH v2 06/15] hw/ide: Rename ich.c -> ich9_ahci.c
Posted by BALATON Zoltan 8 months, 3 weeks ago
On Mon, 26 Feb 2024, Philippe Mathieu-Daudé wrote:
> On 26/2/24 13:52, BALATON Zoltan wrote:
>> On Mon, 26 Feb 2024, Philippe Mathieu-Daudé wrote:
>>> Most ICH9-related files use the 'ich9_' prefix.
>>> Mention 'AHCI' in the file name.
>>> 
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> ---
>>> hw/ide/{ich.c => ich9_ahci.c} | 0
>> 
>> That would rather be ahci-ich9.h then analogous to ahci-allwinnet.c maybe?
>
> We can have all ICH9 functions named ich9_foo.c, or all AHCI
> implementations named bar_ahci.c. But currently there is no
> particular style enforced and we have a mix. I don't mind much.

I think if it's in hw/ide then it should follow conventions used by that 
part. (Which did not follow any convention befure but Thomas adding a 
bunch of headers using - made it have a convention now.) If it's a variant 
of AHCI like the allwinner one then it should be groupped with that and 
named accordingly. If it would be together with other ich9 parts then it 
could be grouped there or if there wasn't already an example for ahci 
variant, but in this case only ahci-ich9 seems consistent within IDE now.

Regsards,
BALATON Zoltan