diff mbox series

[2/5] hw/core/cpu: Rename cpu_class_init() to include 'common'

Message ID 20240111120221.35072-3-philmd@linaro.org
State Superseded
Headers show
Series misc: Trivial code rename cleanup | expand

Commit Message

Philippe Mathieu-Daudé Jan. 11, 2024, 12:02 p.m. UTC
cpu_class_init() is common, so rename it as cpu_common_class_init()
to ease navigating the code.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/core/cpu-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel Henrique Barboza Jan. 11, 2024, 1 p.m. UTC | #1
On 1/11/24 09:02, Philippe Mathieu-Daudé wrote:
> cpu_class_init() is common, so rename it as cpu_common_class_init()
> to ease navigating the code.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

>   hw/core/cpu-common.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
> index 3ccfe882e2..67db07741d 100644
> --- a/hw/core/cpu-common.c
> +++ b/hw/core/cpu-common.c
> @@ -273,7 +273,7 @@ static int64_t cpu_common_get_arch_id(CPUState *cpu)
>       return cpu->cpu_index;
>   }
>   
> -static void cpu_class_init(ObjectClass *klass, void *data)
> +static void cpu_common_class_init(ObjectClass *klass, void *data)
>   {
>       DeviceClass *dc = DEVICE_CLASS(klass);
>       ResettableClass *rc = RESETTABLE_CLASS(klass);
> @@ -304,7 +304,7 @@ static const TypeInfo cpu_type_info = {
>       .instance_finalize = cpu_common_finalize,
>       .abstract = true,
>       .class_size = sizeof(CPUClass),
> -    .class_init = cpu_class_init,
> +    .class_init = cpu_common_class_init,
>   };
>   
>   static void cpu_register_types(void)
diff mbox series

Patch

diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index 3ccfe882e2..67db07741d 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -273,7 +273,7 @@  static int64_t cpu_common_get_arch_id(CPUState *cpu)
     return cpu->cpu_index;
 }
 
-static void cpu_class_init(ObjectClass *klass, void *data)
+static void cpu_common_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
     ResettableClass *rc = RESETTABLE_CLASS(klass);
@@ -304,7 +304,7 @@  static const TypeInfo cpu_type_info = {
     .instance_finalize = cpu_common_finalize,
     .abstract = true,
     .class_size = sizeof(CPUClass),
-    .class_init = cpu_class_init,
+    .class_init = cpu_common_class_init,
 };
 
 static void cpu_register_types(void)