From c9137065814609111ec0ed29246388f4ad086732 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Wed, 30 Aug 2017 15:24:29 +0200 Subject: ppc: use macros to make cpu type name from string literal Replace "-" TYPE_POWERPC_CPU when composing cpu type name from cpu model string literal and the same pattern in format strings with POWERPC_CPU_TYPE_SUFFIX and POWERPC_CPU_TYPE_NAME(model) macroses like we do in x86. Later POWERPC_CPU_TYPE_NAME() will be used to define default cpu type per machine type and as bonus it will be consistent and easy grep-able pattern across all other targets that I'm plannig to treat the same way. Signed-off-by: Igor Mammedov Reviewed-by: David Gibson Signed-off-by: David Gibson --- target/ppc/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/ppc/kvm.c') diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index b6bd0fa7a6..abcfe13b8a 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2529,7 +2529,7 @@ static int kvm_ppc_register_host_cpu_type(void) char *suffix; ppc_cpu_aliases[i].model = g_strdup(object_class_get_name(oc)); - suffix = strstr(ppc_cpu_aliases[i].model, "-"TYPE_POWERPC_CPU); + suffix = strstr(ppc_cpu_aliases[i].model, POWERPC_CPU_TYPE_SUFFIX); if (suffix) { *suffix = 0; } -- cgit v1.2.3-55-g7522