diff mbox series

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

Message ID 20240226111416.39217-7-philmd@linaro.org
State New
Headers show
Series hw/southbridge: Extract ICH9 QOM container model | expand

Commit Message

Philippe Mathieu-Daudé Feb. 26, 2024, 11:14 a.m. UTC
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%)

Comments

BALATON Zoltan Feb. 26, 2024, 12:52 p.m. UTC | #1
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'))
>
Philippe Mathieu-Daudé Feb. 26, 2024, 1:13 p.m. UTC | #2
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%)
BALATON Zoltan Feb. 26, 2024, 1:27 p.m. UTC | #3
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
diff mbox series

Patch

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'))