diff mbox series

[3/7] target/ppc: Move ppc_cpu_class_by_name() declaration to 'cpu.h'

Message ID 20231013125630.95116-4-philmd@linaro.org
State Superseded
Headers show
Series target/ppc: Move most of 'cpu-qom.h' definitions to 'cpu.h' | expand

Commit Message

Philippe Mathieu-Daudé Oct. 13, 2023, 12:56 p.m. UTC
ppc_cpu_class_by_name() is only called in target/ppc/,
no need to expose outside (in particular to hw/).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/ppc/cpu-qom.h | 2 --
 target/ppc/cpu.h     | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Richard Henderson Oct. 13, 2023, 1:31 p.m. UTC | #1
On 10/13/23 05:56, Philippe Mathieu-Daudé wrote:
> ppc_cpu_class_by_name() is only called in target/ppc/,
> no need to expose outside (in particular to hw/).
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/ppc/cpu-qom.h | 2 --
>   target/ppc/cpu.h     | 1 +
>   2 files changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Cédric Le Goater Oct. 13, 2023, 2:04 p.m. UTC | #2
On 10/13/23 14:56, Philippe Mathieu-Daudé wrote:
> ppc_cpu_class_by_name() is only called in target/ppc/,
> no need to expose outside (in particular to hw/).
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.


> ---
>   target/ppc/cpu-qom.h | 2 --
>   target/ppc/cpu.h     | 1 +
>   2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
> index b86fd46d25..3dc92a852e 100644
> --- a/target/ppc/cpu-qom.h
> +++ b/target/ppc/cpu-qom.h
> @@ -37,8 +37,6 @@ OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POWERPC_CPU)
>   
>   #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host")
>   
> -ObjectClass *ppc_cpu_class_by_name(const char *name);
> -
>   typedef struct CPUArchState CPUPPCState;
>   typedef struct ppc_tb_t ppc_tb_t;
>   typedef struct ppc_dcr_t ppc_dcr_t;
> diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
> index 30392ebeee..8bb66fbea4 100644
> --- a/target/ppc/cpu.h
> +++ b/target/ppc/cpu.h
> @@ -1342,6 +1342,7 @@ struct ArchCPU {
>   };
>   
>   
> +ObjectClass *ppc_cpu_class_by_name(const char *name);
>   PowerPCCPUClass *ppc_cpu_class_by_pvr(uint32_t pvr);
>   PowerPCCPUClass *ppc_cpu_class_by_pvr_mask(uint32_t pvr);
>   PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass *pcc);
diff mbox series

Patch

diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
index b86fd46d25..3dc92a852e 100644
--- a/target/ppc/cpu-qom.h
+++ b/target/ppc/cpu-qom.h
@@ -37,8 +37,6 @@  OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POWERPC_CPU)
 
 #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host")
 
-ObjectClass *ppc_cpu_class_by_name(const char *name);
-
 typedef struct CPUArchState CPUPPCState;
 typedef struct ppc_tb_t ppc_tb_t;
 typedef struct ppc_dcr_t ppc_dcr_t;
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 30392ebeee..8bb66fbea4 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1342,6 +1342,7 @@  struct ArchCPU {
 };
 
 
+ObjectClass *ppc_cpu_class_by_name(const char *name);
 PowerPCCPUClass *ppc_cpu_class_by_pvr(uint32_t pvr);
 PowerPCCPUClass *ppc_cpu_class_by_pvr_mask(uint32_t pvr);
 PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass *pcc);